Jonathan Kew
103d8f60a3
Bug 1783421 - Don't cache an hb_face_t in gfxFontEntry to share between font instances, as it is not thread-safe. r=aosmond
...
Differential Revision: https://phabricator.services.mozilla.com/D153853
2022-08-06 11:54:00 +00:00
Butkovits Atila
84489c001f
Backed out changeset 6f0f72915ef9 (bug 1783421) for causing assertion failures at hb-object.hh. CLOSED TREE
2022-08-05 22:48:05 +03:00
Jonathan Kew
a1b8c2ecdc
Bug 1783421 - Don't cache an hb_face_t in gfxFontEntry to share between font instances, as it is not thread-safe. r=aosmond
...
Differential Revision: https://phabricator.services.mozilla.com/D153853
2022-08-05 15:07:41 +00:00
Jonathan Kew
d58446c275
Bug 1772189 - Avoid potential infinite recursion when initializing vertical metrics, if the font has a broken 'vmtx' table. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D148928
2022-06-16 12:38:35 +00:00
Marian-Vasile Laza
e7fd6c547f
Backed out changeset 8e8c5926cdde (bug 1772189) for causing web-platform reftest failures on ch-unit-002.html. CLOSED TREE
2022-06-11 18:45:48 +03:00
Jonathan Kew
b9a6c88490
Bug 1772189 - Avoid potential infinite recursion when initializing vertical metrics, if the font has a broken 'vmtx' table. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D148928
2022-06-11 14:32:50 +00:00
criss
f377db97ef
Backed out changeset b2d7601357c9 (bug 1772189) for causing multiple reftest failures. CLOSED TREE
2022-06-10 21:28:18 +03:00
Jonathan Kew
0bd9ebfd30
Bug 1772189 - Avoid potential infinite recursion when initializing vertical metrics, if the font has a broken 'vmtx' table. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D148928
2022-06-10 17:30:45 +00:00
Jonathan Kew
331c406f5c
Bug 1756720 - When using legacy MS Symbol fonts, map character codes from the U+00xx range to the PUA range U+F0xx found in the cmap subtables. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D139724
2022-03-01 15:22:56 +00:00
Marian-Vasile Laza
a0a962b604
Backed out changeset cd5ac5f6ff6e (bug 1756720) for causing reftest failures on 399636-standards-css.html. CLOSED TREE
2022-02-28 16:53:40 -08:00
Jonathan Kew
6901bd37b7
Bug 1756720 - When using legacy MS Symbol fonts, map character codes from the U+00xx range to the PUA range U+F0xx found in the cmap subtables. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D139724
2022-02-28 20:38:38 +00:00
Jonathan Kew
9477e32f16
Bug 1531223 - Add support for the 'ic' font-relative unit. r=emilio
...
This is a "simplified" implementation of 'ic', similar to what Safari Preview
currently supports: it only considers the advance of U+6C34 if found in the
first available font, and otherwise falls back to the default of 1em.
(The spec allows for this "in cases where it is impossible or impractical to
determine the ideographic advance measure".)
Differential Revision: https://phabricator.services.mozilla.com/D132818
2021-12-08 17:07:05 +00:00
Dan Minor
522eefbe31
Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-06 18:15:50 +00:00
Dan Minor
e12c3387e8
Bug 1719554 - Unify most of nsUnicodeProperties.h; r=platform-i18n-reviewers,jfkthame,gregtatum,necko-reviewers,valentin
...
This unifies most of the calls in nsUnicodeProperties.h. CharType and Script
will be handled in subsequent patches on this bug.
Differential Revision: https://phabricator.services.mozilla.com/D132273
2021-12-06 18:15:49 +00:00
Butkovits Atila
56c46d06a1
Backed out 3 changesets (bug 1719554) for causing bustages complaining about gfxTextRun.cpp.
...
Backed out changeset 6181e40d4da1 (bug 1719554)
Backed out changeset c261ede6ae81 (bug 1719554)
Backed out changeset 221ec418475c (bug 1719554)
2021-12-04 00:58:15 +02:00
Dan Minor
30ad309163
Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-03 20:49:32 +00:00
Dan Minor
c0ebed22d3
Bug 1719554 - Unify most of nsUnicodeProperties.h; r=platform-i18n-reviewers,jfkthame,gregtatum,necko-reviewers,valentin
...
This unifies most of the calls in nsUnicodeProperties.h. CharType and Script
will be handled in subsequent patches on this bug.
Differential Revision: https://phabricator.services.mozilla.com/D132273
2021-12-03 20:49:31 +00:00
Chris Peterson
67f51f29e2
Bug 1732481 - Fix non-unified build errors in gfx. r=gfx-reviewers,jrmuizel
...
Building with ac_add_options --disable-unified-build on macOS hits the following warnings-as-errors:
gfx/2d/FilterNodeSoftware.cpp:1022:10 [-Wunreachable-code-return] 'return' will never be executed
gfx/2d/DrawTargetCairo.cpp:1957:20 [-Wunused-function] unused function 'GfxMatrixToPixmanTransform'
gfx/thebes/gfxHarfBuzzShaper.cpp:1008:23: warning: unused variable 'sDageshForms' [-Wunused-const-variable]
gfx/thebes/gfxMacPlatformFontList.mm:818:31 [-Wunused-const-variable] unused variable 'kLangFontsDirs'
gfx/tests/gtest/TestSwizzle.cpp:221:21 [-Wunreachable-code] code will never be executed
gfx/tests/gtest/TestTreeTraversal.cpp:16:11 [-Wunused-const-variable] unused variable 'PERFORMANCE_TREE_DEPTH'
gfx/tests/gtest/TestTreeTraversal.cpp:17:11 [-Wunused-const-variable] unused variable 'PERFORMANCE_TREE_CHILD_COUNT'
gfx/tests/gtest/TestTreeTraversal.cpp:18:11 [-Wunused-const-variable] unused variable 'PERFORMANCE_TREE_LEAF_COUNT'
gfx/tests/gtest/TestTreeTraversal.cpp:19:11 [-Wunused-const-variable] unused variable 'PERFORMANCE_REGION_XWRAP'
gfx/vr/VRDisplayPresentation.cpp:151:3 [-Wunreachable-code-loop-increment] loop will run at most once (loop increment never executed)
gfx/ycbcr/scale_yuv_argb.cpp:61:21 [-Wunused-function] unused function 'Abs'
Differential Revision: https://phabricator.services.mozilla.com/D126592
2021-09-24 19:14:46 +00:00
Jonathan Kew
3da669f852
Bug 1719544 - part 2 - Convert gfxHarfBuzzShaper normalization callbacks from direct ICU access to mozilla::intl::String APIs. r=platform-i18n-reviewers,dminor
...
Depends on D126259
Differential Revision: https://phabricator.services.mozilla.com/D126260
2021-09-22 21:27:54 +00:00
criss
6685fa570d
Backed out 2 changesets (bug 1719544) for causing bustages on gtest.h:1445:11. CLOSED TREE
...
Backed out changeset 4ab330369412 (bug 1719544)
Backed out changeset b5d8d32d8326 (bug 1719544)
2021-09-22 23:33:48 +03:00
Jonathan Kew
71ac7ba474
Bug 1719544 - part 2 - Convert gfxHarfBuzzShaper normalization callbacks from direct ICU access to mozilla::intl::String APIs. r=platform-i18n-reviewers,dminor
...
Depends on D126259
Differential Revision: https://phabricator.services.mozilla.com/D126260
2021-09-22 18:48:53 +00:00
Ryan VanderMeulen
f2c97ff01c
Bug 1726416 - Revert the changes made by bug 1716029 which are no longer needed. r=jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D124822
2021-09-09 14:48:32 +00:00
Jonathan Kew
0c5c1f4b21
Bug 1716029 - Shape numeric runs in Arabic or Hebrew with RTL buffer directionality, so that OpenType rules will process glyphs in logical order. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D117910
2021-06-17 19:11:22 +00:00
Sandor Molnar
0a290a2d13
Backed out changeset bd9776af79de (bug 1716029) for causing reftest failures. CLOSED TREE
2021-06-15 21:08:06 +03:00
Jonathan Kew
3050aa82c8
Bug 1716029 - Shape numeric runs in Arabic or Hebrew with RTL buffer directionality, so that OpenType rules will process glyphs in logical order. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D117910
2021-06-15 16:44:50 +00:00
Jonathan Kew
553fdd24fc
Bug 1711479 - Support various metrics (not only ex-height) as the basis for font-size-adjust calculations in the gfx font implementations. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D115211
2021-06-14 12:32:37 +00:00
Jonathan Kew
16eb1dba68
Bug 1674340 - Separate out language from gfxFontStyle and pass it separately to shaping processes that need it. r=lsalzman
...
This allows us to avoid instantiating separate gfxFont objects when content is tagged
with different 'lang' attributes, yet ends up using the same fonts (e.g. Wikipedia may
use a default font such as Arial for language names/links that are tagged with several
dozen different languages).
Differential Revision: https://phabricator.services.mozilla.com/D96978
2020-11-13 13:15:39 +00:00
Jonathan Kew
eae3c7f86f
Bug 1673098 - Ensure we use our implementation of the get_nominal_glyph callback when shaping a CFF font, so that hyphen fallbacks can take effect. r=lsalzman
...
CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D94681
2020-10-26 05:33:06 +00:00
Mihai Alexandru Michis
36e7dbc5bc
Backed out changeset 0a6c18c6e9d5 (bug 1673098) for causing webrender failures.
...
CLOSED TREE
2020-10-26 15:35:55 +02:00
Jonathan Kew
8da8e8eeda
Bug 1673098 - Ensure we use our implementation of the get_nominal_glyph callback when shaping a CFF font, so that hyphen fallbacks can take effect. r=lsalzman
...
Differential Revision: https://phabricator.services.mozilla.com/D94681
2020-10-26 05:33:06 +00:00
Jonathan Kew
38e52e6931
Bug 1670581 - Fall back to ASCII hyphen-minus if Unicode hyphen character is not supported by the chosen font. r=m_kato
...
Differential Revision: https://phabricator.services.mozilla.com/D93208
2020-10-13 11:00:20 +00:00
Jonathan Kew
6dc05ab6ef
Bug 1665773 - Ensure CompressedGlyph::SetComplex() always clears the glyphCount to zero; let gfxShapedText::SetDetailedGlyphs() own the setting of this field. r=heycam
...
We also rearrange bits in the CompressedGlyph so that the advance field doesn't need to be shifted,
and remove unnecessary glyphCount parameters from various setter methods.
Differential Revision: https://phabricator.services.mozilla.com/D90678
2020-09-30 21:16:44 +00:00
Jonathan Kew
95e0f6f509
Bug 1655364 - Rename gfxShapedText::SetGlyphs to SetDetailedGlyphs and make it just set glyph information, not clobber character-type flags. r=heycam
...
Differential Revision: https://phabricator.services.mozilla.com/D85187
2020-07-30 11:48:06 +00:00
Mihai Alexandru Michis
78c470dbaa
Backed out changeset 3c88adc13a06 (bug 1655364) for causing assertion failures regarding glyphs.
...
CLOSED TREE
2020-07-30 13:25:04 +03:00
Jonathan Kew
ab3b20c648
Bug 1655364 - Rename gfxShapedText::SetGlyphs to SetDetailedGlyphs and make it just set glyph information, not clobber character-type flags. r=heycam
...
Differential Revision: https://phabricator.services.mozilla.com/D85187
2020-07-30 07:56:05 +00:00
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