Граф коммитов

163 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 230f11b26b Bug 1629787 - Initialize font metrics via harfbuzz API rather than reading tables directly, so that variations are respected. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D71029

--HG--
extra : moz-landing-system : lando
2020-04-15 14:14:55 +00:00
Jonathan Kew 25f7012319 Bug 1588788 - Pass the correct variation settings to harfbuzz shaping, including any derived from font-weight/-stretch/-style properties. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D50830

--HG--
extra : moz-landing-system : lando
2019-10-28 20:57:19 +00:00
Lee Salzman 44eb8379af Bug 1547063 - Use FreeType metrics directly instead of querying Cairo. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44497

--HG--
extra : moz-landing-system : lando
2019-09-16 17:15:10 +00:00
Cosmin Sabou 8113720646 Backed out 8 changesets (bug 1547063) for causing bug 1581466. a=backout
Backed out changeset c969a93b0ca7 (bug 1547063)
Backed out changeset 003f5a79c6a7 (bug 1547063)
Backed out changeset 2c7032b4d022 (bug 1547063)
Backed out changeset 23892ecc6ef8 (bug 1547063)
Backed out changeset af6e6807ece7 (bug 1547063)
Backed out changeset ebc71e607938 (bug 1547063)
Backed out changeset 772c3427c791 (bug 1547063)
Backed out changeset e74a67e2afe3 (bug 1547063)
2019-09-16 10:44:20 +03:00
Lee Salzman 0d6ebe2503 Bug 1547063 - Use FreeType metrics directly instead of querying Cairo. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44497

--HG--
extra : moz-landing-system : lando
2019-09-15 03:01:19 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Jonathan Kew 77eec3b081 Bug 197649 - For OpenType/CFF fonts, use harfbuzz ot-font functions rather than thebes callbacks. r=jrmuizel
This provides glyph-extents support for these fonts, so that fallback diacritic positioning can work.

In principle we could try switching to the hb_ot_font functions for all fonts, but this carries
some risk of disrupting other issues: (1) on some platforms, our glyph-advance callbacks use platform
APIs rather than reading the font file directly, in order to respect hinting that may be in effect;
and (2) the hb_ot_font functions don't currently provide fallbacks for CJK Compatibility Ideographs
Standardized Variants, as implemented for Gecko in bug 989557, so that case would be regressed.

Hence, for the time being switching only for OpenType/CFF fonts, where the thebes callbacks are
known to be incomplete (no glyph-extents support) is the safer, more conservative approach.

Differential Revision: https://phabricator.services.mozilla.com/D29010

--HG--
extra : moz-landing-system : lando
2019-04-30 21:11:06 +00:00
Jonathan Kew a978a2a32d Bug 1533428 - patch 2 - Move the Orientation enum from gfxFont to nsFontMetrics to enable some #include-elimination, in particular to avoid including gfxTextRun.h in nsFontMetrics.h. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22913

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:19 +00:00
Jonathan Kew e17031a2ca Bug 1528758 - No need for a null-check before calling hb_*_destroy functions, as they do it internally. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D20177

--HG--
extra : moz-landing-system : lando
2019-02-18 17:16:22 +00:00
Jeff Muizelaar 6bf19bfac4 Bug 1516677. Remove unused drawtarget parameter. r=jfkthame
With bug 1509358 having landed we don't need a draw target in a bunch of
places.  This removes it from those places.

Differential Revision: https://phabricator.services.mozilla.com/D15481

--HG--
extra : moz-landing-system : lando
2018-12-31 11:43:27 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jonathan Kew 6f42f167fb Bug 1490402 - Use UTF-8 strings (in place of UTF-16) for font family/face names in the system font list, to reduce memory footprint. r=lsalzman 2018-09-12 20:34:57 +01:00
Andi-Bogdan Postelnicu b2d4c86823 Bug 1453795 - GFX - Initialize member fields in classes/ structures. r=nical
--HG--
extra : rebase_source : 56f2cc017632bf27115490ae05254019108c6179
extra : amend_source : 98ea6c3c02a9f7650d2cf65deaf5085cf9a2efa4
2018-06-16 17:42:33 +03:00
Jonathan Kew 899b2539d6 Bug 1471584 - Micro-optimize text shaping by avoiding an unnecessary virtual method call. r=lsalzman 2018-06-27 16:12:43 +01:00
Jonathan Kew a482ff352e Bug 1412882 - Rework gfxFontUtils::MapCharToGlyphFormat4 to be more robust. r=lsalzman 2018-05-19 08:32:22 +01:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jonathan Kew f668fe528e Bug 1438674 - For non-OpenType/TrueType fonts, use synthesized glyph origin & advance for vertical shaping, rather than just refusing to use the font. r=dholbert 2018-02-16 12:40:43 +00:00
Jonathan Kew d477a069f3 Bug 1431305 - Handle fallback (rotated) rendering of characters with Vertical_Orientation=Tr when the font does not support them via 'vert', nor is there a vertical presentation form encoded in Unicode. r=m_kato 2018-01-19 10:46:53 +00:00
shindli 6399f1f1af Backed out changeset 33571130ef67 (bug 1431305) for failing in /text-orientation-mixed-vlr-100-ref.html on a CLOSED TREE 2018-01-19 17:56:20 +02:00
Jonathan Kew 6aa84ed3ae Bug 1431305 - Handle fallback (rotated) rendering of characters with Vertical_Orientation=Tr when the font does not support them via 'vert', nor is there a vertical presentation form encoded in Unicode. r=m_kato 2018-01-19 10:46:53 +00:00
Jonathan Kew 49c97adb4e Bug 1411625 - Remove the constructor from gfxShapedText::CompressedGlyph to make it a trivial class, and provide a couple of convenience "factory" methods to create simple and complex glyph values. r=andi 2017-11-11 15:32:58 +00:00
Jonathan Kew 0aa24e331c Bug 1412355 - Replace the mXOffset/mYOffset fields in DetailedGlyph records with a gfx::Point that stores glyph offsets in line-orientation-relative coordinates. r=jrmuizel 2017-10-30 14:55:42 +00:00
Sebastian Hengst 8968724f1a Backed out changeset 4905048de8d1 (bug 1412355) for frequently failing reftest layout/reftests/writing-mode/1248248-1-orientation-break-glyphrun.html on Linux x64 debug and asan. r=backout
--HG--
extra : amend_source : 61e56c97354c788bfd03aa551e911a1aff14006e
2017-10-28 16:39:59 +02:00
Jonathan Kew 8397a853b8 Bug 1412355 - Replace the mXOffset/mYOffset fields in DetailedGlyph records with a gfx::Point that stores glyph offsets in line-orientation-relative coordinates. r=jrmuizel 2017-10-28 11:37:35 +01:00
Jonathan Kew 824ae50de4 Bug 1395926 - Fix up handling of glyph offsets for text shaped in vertical mode. r=jrmuizel 2017-10-27 18:57:45 +01:00
Jonathan Kew 589b1b4dc7 Bug 1360128 - Pass values from font-variation-settings through to the harfbuzz font object, so that shaping can take variations into account. r=jrmuizel 2017-10-12 14:25:11 +01:00
Jonathan Kew 815fd00452 Bug 1402049 - Remove support for using legacy Gecko normalization in gfxHarfBuzzShaper, as ICU is always available. r=jrmuizel 2017-09-22 10:37:16 +01:00
Jonathan Kew 230ad8f9a7 Bug 1376231 - Invert the sign of glyph advance and origin y-coordinates in vertical mode, to match harfbuzz expectations, and then convert the resulting glyph positioning back to gecko's orientation. r=jrmuizel 2017-09-21 14:15:02 +01:00
Wes Kocher 8afe601b42 Backed out 2 changesets (bug 1376231) for reftest failures in 1376231-vertical-gpos-adjustments-ref.html a=backout
Backed out changeset e4edd97bf01a (bug 1376231)
Backed out changeset b36ff08b10ee (bug 1376231)

MozReview-Commit-ID: IiPIU5iGnWV
2017-09-20 10:41:55 -07:00
Jonathan Kew 06005702ce Bug 1376231 - Invert the sign of glyph advance and origin y-coordinates in vertical mode, to match harfbuzz expectations, and then convert the resulting glyph positioning back to gecko's orientation. r=jrmuizel 2017-09-20 17:27:00 +01:00
Jonathan Kew 82bdaf03b2 Bug 1395061 - patch 3 - Clean up vestigial code that existed to support setting the gfxFontEntry::mSymbolFont flag. r=jrmuizel 2017-09-11 19:23:30 +01:00
Jonathan Kew 7efc47d89a Bug 1361392 - Re-use the hb_buffer in gfxHarfBuzzShaper instead of creating/destroying it on each call to ShapeText. r=jrmuizel 2017-05-02 16:41:42 +01:00
Wes Kocher 52209697e6 Backed out changeset eee394a4575b (bug 1361392) for leaksanitizer failures in pretty much all ASAN mochitests a=backout
MozReview-Commit-ID: 7ap4ag3i0IE
2017-05-05 15:58:49 -07:00
Jonathan Kew e83f392e61 Bug 1361392 - Re-use the hb_buffer in gfxHarfBuzzShaper instead of creating/destroying it on each call to ShapeText. r=jrmuizel 2017-05-05 22:04:48 +01:00
Jonathan Kew 4b5525bbf7 Bug 1362167 - Use strongly-typed enum classes instead of generic uint16_t fields for the gfxShapedText and gfxTextRun flags. r=jrmuizel 2017-05-04 22:27:05 +01:00
Jonathan Kew 6f0d451756 Bug 1352528 - Hoist call to GetRoundOffsetsToPixels out of the inner loop of text shaping. r=jrmuizel 2017-04-03 17:49:17 +01:00
David Major 17f71c7f9f Bug 1341490: Unified-build bustage fixes.
MozReview-Commit-ID: CTBa12qhMai

--HG--
extra : rebase_source : e48409d3dcd38b95e567c823050a5633e89ed643
2017-02-23 15:29:46 +13:00
Jonathan Kew 8edf19e319 Bug 1320665 - Add support for 'cmap' subtable format 13. r=jrmuizel 2016-12-13 12:15:24 +00:00
Phil Ringnalda ce8fd410e7 Backed out 2 changesets (bug 1320665) for Windows failures in 1320665-cmap-format-13.html
Backed out changeset b2bac083c74e (bug 1320665)
Backed out changeset 59bdf1eb5d2d (bug 1320665)

MozReview-Commit-ID: 2M9tcerb3pm
2016-12-13 10:56:17 -08:00
Jonathan Kew aa1f85e3d9 Bug 1320665 - Add support for 'cmap' subtable format 13. r=jrmuizel 2016-12-13 16:16:57 +00:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Jonathan Kew 4c29384d07 Bug 1297365 - Remove legacy Hebrew presentation-form composition rules from gecko, and rely on harfbuzz internally applying these only to fonts that need them. r=jrmuizel 2016-08-24 11:44:26 +01:00
Igor 175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Jonathan Kew c60f6a1ae4 Bug 1266391 - Introduce an enum class mozilla::unicode::Script, and use this instead of bare integers to specify script codes for better type checking. r=masayuki 2016-04-21 18:58:59 +01:00
Jonathan Kew 7915ca7325 Bug 1263956 - Adopt the new harfbuzz API for char-to-glyph mapping functions. r=jrmuizel 2016-04-13 13:48:40 +01:00
Birunthan Mohanathas 690e6fe38b Bug 1235261 - Part 3: Switch remaining uses of AutoFallibleTArray to AutoTArray. r=froydnj
This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
2016-02-02 17:36:30 +02:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00