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

100 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew a16705e745 Bug 1634677 - patch 1 - Add a pref to control visibility of different categories of installed font families. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D73441
2020-05-07 21:10:46 +00:00
Jonathan Kew afb04b12e3 Bug 1628419 - Don't keep a live CGFont reference in every macOS font entry; only retain it for fonts actually used. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D70225

--HG--
extra : moz-landing-system : lando
2020-04-08 17:35:30 +00:00
Jonathan Kew 1ab7bd6878 Bug 1619350 - patch 2 - Add lists of standard Mac and Windows fonts, and set font-family visibility attributes accordingly in those platform font lists. r=jwatt
These two platforms are the easiest to get started with - as well as accounting for the great majority
of desktop Firefox users.

This patch is based on the OS vendors' lists of fonts shipped with the current version of each OS.

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

--HG--
extra : moz-landing-system : lando
2020-04-02 01:38:21 +00:00
Jonathan Kew 1e295dc3cc Bug 1619350 - patch 1 - Add a FontVisibility enumeration to determine whether fonts should be visible by name to CSS, and provide a visibility field in font family records. r=jwatt
This replaces and extends the "hidden" flag we currently use on macOS to mark internal system fonts
like .LastResort and .Keyboard that should not be exposed; rather than just a boolean "hidden" flag
we'll have several levels of visibility, some of which the user may opt in to exposing (at the cost
of potentially becoming more fingerprintable).

The current patch assumes three levels besides always-hidden:

  Base     - fonts that are part of the base OS install and always available
  LangPack - fonts that are provided by the OS subject to user's chosen language options
  User     - user-installed fonts that were not provided by the OS

(This categorization may be subject to revision as we learn more about real-world needs and
configurations.)

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

--HG--
extra : moz-landing-system : lando
2020-04-02 12:36:24 +00:00
Ciure Andrei e1cb0f1e21 Backed out 4 changesets (bug 1619349, bug 1619350) for causing test_font_whitelist.html to fail CLOSED TREE
Backed out changeset ba16b09b5da0 (bug 1619349)
Backed out changeset f8ca02252dfc (bug 1619349)
Backed out changeset 01a2a527aa1a (bug 1619350)
Backed out changeset 67ee13868a44 (bug 1619350)
2020-04-02 04:34:31 +03:00
Jonathan Kew 2fe7f23db5 Bug 1619350 - patch 2 - Add lists of standard Mac and Windows fonts, and set font-family visibility attributes accordingly in those platform font lists. r=jwatt
These two platforms are the easiest to get started with - as well as accounting for the great majority
of desktop Firefox users.

This patch is based on the OS vendors' lists of fonts shipped with the current version of each OS.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 21:42:11 +00:00
Jonathan Kew 503dffb1e0 Bug 1619350 - patch 1 - Add a FontVisibility enumeration to determine whether fonts should be visible by name to CSS, and provide a visibility field in font family records. r=jwatt
This replaces and extends the "hidden" flag we currently use on macOS to mark internal system fonts
like .LastResort and .Keyboard that should not be exposed; rather than just a boolean "hidden" flag
we'll have several levels of visibility, some of which the user may opt in to exposing (at the cost
of potentially becoming more fingerprintable).

The current patch assumes three levels besides always-hidden:

  Base     - fonts that are part of the base OS install and always available
  LangPack - fonts that are provided by the OS subject to user's chosen language options
  User     - user-installed fonts that were not provided by the OS

(This categorization may be subject to revision as we learn more about real-world needs and
configurations.)

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

--HG--
extra : moz-landing-system : lando
2020-03-26 18:39:43 +00:00
Jonathan Kew 315b16ea22 Bug 1621248 - Declare various gfxPlatform and font-list subclasses as 'final'. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D66204

--HG--
extra : moz-landing-system : lando
2020-03-10 15:00:56 +00:00
Jonathan Kew 3df4ab8b5e Bug 1620111 - Eliminate sync-IPC message ReadFontList, instead use SetXPCOMProcessAttributes to pass font list to the child process on Android. r=lsalzman,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D65742

--HG--
extra : moz-landing-system : lando
2020-03-09 12:27:45 +00:00
Barret Rennie 06f829cc25 Bug 1289211 - Rename InfallibleTArray to nsTArray in gfx/thebes/ r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D36955

--HG--
extra : moz-landing-system : lando
2019-07-10 03:29:40 +00:00
Jonathan Kew fee6d28be8 Bug 1561600 - Support the special Osaka-mono font (family) for Japanese on macOS, by hooking up the font.single-face-list pref to the shared font-list's alias table. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D36023

--HG--
extra : moz-landing-system : lando
2019-06-26 18:58:48 +00:00
Jonathan Kew 91826a2e60 Bug 1554193 - Move support for the AAT 'trak' table from platform-specific MacFontEntry/gfxMacFont into the generic gfxFontEntry/gfxFont classes. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D33068

--HG--
extra : moz-landing-system : lando
2019-05-30 10:28:44 +00:00
Jonathan Kew 95ce484f4f Bug 1514869 - patch 3 - Implement macOS backend for the shared font list. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22939

--HG--
extra : moz-landing-system : lando
2019-04-27 15:38:26 +00:00
Jonathan Kew 300d6b5a42 Bug 1514869 - patch 2 - Adapt platform-font-list code to work with either the existing in-process font list or cross-process shared font list. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22938

--HG--
extra : moz-landing-system : lando
2019-04-27 15:37:58 +00:00
Jonathan Kew d2a3361fa4 Bug 1533428 - patch 7 - Create a FontFamily type that wraps either a gfxFontFamily pointer or a mozilla::fontlist::Family pointer (to be used by the shared font list), and use this in various places where we need to pass families around. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22934

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:34 +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
Emilio Cobos Álvarez 323b5be77a Bug 1526294 - Should not need a pres context to get a system font. r=jfkthame
The only caller wants CSS pixels, no need to go back and forth.

This is the last dependency on the pres context, I think, from the style system
font code.

Differential Revision: https://phabricator.services.mozilla.com/D19147
2019-02-15 01:35:13 +01: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
Jonathan Kew d4b7d95206 Bug 1464400 - Keep track of CSS generics when resolving to actual font families and faces, and expose as a new CSSGeneric attribute on InspectorFontFace. r=jwatt 2018-05-25 14:07:57 +01:00
Brindusan Cristian 2c5b7db570 Backed out changeset f8dbb1d2d07c (bug 1464400) for mochitest failures on test_font_whitelist.html. CLOSED TREE 2018-06-01 19:07:24 +03:00
Jonathan Kew 0cc7412d4f Bug 1464400 - Keep track of CSS generics when resolving to actual font families and faces, and expose as a new CSSGeneric attribute on InspectorFontFace. r=jwatt 2018-05-25 14:07:57 +01:00
Jonathan Kew 526ed0b391 Bug 1457417 - Work around Core Text mishandling of 'opsz' axis when set to the font's default, by adjusting to a fractionally-different setting. r=jwatt 2018-05-15 14:59:26 +01:00
Jonathan Kew e92b9e44cf Bug 1449605 - part 1 - Rearrange thebes font code so that the decision whether to apply synthetic-bold is deferred until actually instantiating a font, not made during the font-matching process. r=jwatt
This rearranges how synthetic-bold use is determined in the font selection
& rendering code. Previously, we would decide during the font-selection
algorithm whether we need to apply synthetic-bold to the chosen face, and
then pass that decision through the fontgroup (storing it in the FamilyFace
entries of the mFonts array there) down to the actual rendering code that
instantiates fonts from the faces (font entries) we've selected.

That became a problem for variation fonts because in the case of a user
font, we may not have downloaded the resource yet, so we just have a "user
font container" entry, which carries the descriptors from the @font-face
rule and will fetch the actual resource when needed. But in the case of a
@font-face rule without a weight descriptor, we don't actually know at
font-selection time whether the face will support "true" bold (via a
variation axis) or not, so we can't reliably make the right decision about
applying synthetic bold.

So we now defer that decision until we actually instantiate a platform font
object to shape/measure/draw text. At that point, we have the requested
style and we also have the real font resource, so we can easily determine
whether fake-bold is required.

(This patch should not result in any visible behavior change; that will
come in a second patch now that the architecture supports it.)
2018-05-01 10:30:50 +01:00
Jonathan Kew c57f185cd9 Bug 1454598 - part 3 - Use WeightRange more extensively in place of FontWeight throughout user-font handling and font-entry creation, and handle Stretch and SlantStyle similarly. r=jwatt 2018-04-25 07:18:23 +01:00
Jonathan Kew 7e27ba83c3 Backed out 4 changesets from bug 1454598 (26e036b1c703, bc910e36a7d7, bac001216577, 5af215d265b6) due to macOS 10.12 font issues. 2018-04-25 10:18:07 +01:00
Jonathan Kew 8489323f79 Bug 1454598 - part 3 - Use WeightRange more extensively in place of FontWeight throughout user-font handling and font-entry creation, and handle Stretch and SlantStyle similarly. r=jwatt 2018-04-25 07:18:23 +01:00
Jonathan Watt 156c4af1ec Bug 1436048: Use user defined types for font-stretch / font-style. r=jfkthame,jwatt
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: 7ONYtICeAqb
2018-04-23 18:22:05 +02:00
Jonathan Kew 94238d9823 Bug 1452973 - Update NS_FONT_STRETCH_* constants to values based on the percentage definitions in css fonts 4. r=jwatt 2018-04-16 10:00:57 +01:00
Jonathan Watt 1e7f76576a Bug 1436048 part 1 - Use a user defined type for font weight everywhere. r=jfkthame,emilio
--HG--
extra : rebase_source : 2e267ff99de6f52484e34ac15c39e5ca8b473394
2018-04-13 20:34:37 +01:00
Jonathan Kew 4755d882f1 Bug 1432552 - patch 3 - DirectWrite and macOS font back-end implementation of getVariationInstances. r=dholbert 2018-01-29 13:24:11 +00:00
Jonathan Kew 8b13b6b801 Bug 1323743 - patch 3 - macOS implementation of the gfxFontEntry::GetVariationAxes method. r=dholbert 2018-01-26 15:47:20 +00:00
Jonathan Kew 455fe3a96e Bug 1323743 - patch 1 - Add an API to gfxFontEntry to allow querying the available variation axes in a font face. (No actual implementation yet.) r=dholbert 2018-01-26 15:47:19 +00:00
Jonathan Kew a889197da2 Bug 1412090 - patch 2 - Rework the fontconfig-based platform font list implementation to pass the list of available font patterns from chrome to content, instead of letting the content process get it directly from fontconfig. r=lsalzman 2017-11-02 20:29:33 +00:00
Jonathan Kew c28cae074c Bug 1412090 - patch 1 - Wrap the font family record used to pass font info from chrome to content on macOS in a union, in preparation for using the same mechanism with a different type of font record on Linux. (No functional change here, just the added union type and some renamings from 'font family list' to 'font list' to be more generic.) r=lsalzman 2017-11-02 17:23:16 +00:00
Jonathan Kew 7036cc5f85 Backed out changesets 75e7f32c3365, eec946b59360, 72a6f5f3512c, ea8ee40ed426 (bug 1412090) for apparently breaking all system-installed fonts on some Linux systems. r=backout 2017-11-10 16:05:33 +00:00
Jonathan Kew 0ba9f9c57b Bug 1412090 - patch 2 - Rework the fontconfig-based platform font list implementation to pass the list of available font patterns from chrome to content, instead of letting the content process get it directly from fontconfig. r=lsalzman 2017-11-02 20:29:33 +00:00
Jonathan Kew 90bf3da506 Bug 1412090 - patch 1 - Wrap the font family record used to pass font info from chrome to content on macOS in a union, in preparation for using the same mechanism with a different type of font record on Linux. (No functional change here, just the added union type and some renamings from 'font family list' to 'font list' to be more generic.) r=lsalzman 2017-11-02 17:23:16 +00:00
Lee Salzman 600dccf87f Bug 1404742 - track ScaledFont and UnscaledFont lifetimes with ThreadSafeWeakPointer. r=bas
MozReview-Commit-ID: GRSEYh1fG4U
2017-10-18 14:22:09 -04:00
Jonathan Kew 04f08a60e2 Bug 1405148 - part 3 - Use Core Text API to check for presence of small-caps feature in AAT fonts. r=jrmuizel 2017-10-11 22:12:43 +01:00
Jonathan Kew f25ad51b7c Bug 1405148 - part 2 - Map the 'smcp' OpenType feature to its AAT feature-selector equivalent when shaping via Core Text. r=jrmuizel 2017-10-11 22:12:43 +01:00
Jonathan Kew 2f7b2b13bf Bug 1405148 - part 1 - Make gfxFontEntry::SupportsOpenTypeFeature a virtual method, and override on MacOS for AAT fonts that we'll shape with Core Text instead of HarfBuzz. r=jrmuizel 2017-10-11 22:12:42 +01:00
Jonathan Kew e592a806a6 Bug 1398802 - Support the AAT 'trak' table when shaping macOS fonts via Core Text. r=jrmuizel 2017-09-27 11:16:35 +01:00
Jonathan Kew 6ceb7d87f9 Bug 835204 - Accept styled font-family names as used in the legacy GDI model, for compatibility with content that assumes GDI-style font naming. r=heycam 2017-08-01 11:25:35 +01:00
Jonathan Kew 0ef13f6a7e Bug 1392659 - Activate fonts available in the macOS "Language Support" directory so that they are available in Gecko. r=jrmuizel 2017-08-24 09:33:38 +01:00
JerryShih fcec675802 Bug 1368531 - Put the task gfxPlatformFontList::InitOtherFamilyNames() into idle queue. r=jfkthame
Add a boolean value in FindFamily() to check if gecko needs to defer the
InitOtherFamilyNames() task into idle queue.

Add a new telemetry data FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING for the
execution time of InitOtherFamilyNames() running regularly at main thread
instead of in idle queue.

MozReview-Commit-ID: A3YPDcHtXrX
2017-08-02 20:33:00 -04:00
Sebastian Hengst c2b9c2c204 Backed out changeset e1d538cd1cf8 (bug 1368531) for bustage on Windows: 'gfxPlatformFontList::InitOtherFamilyNamesRunnable::Cancel': overriding virtual function differs from 'mozilla::CancelableRunnable::Cancel' only by calling convention. r=backout 2017-08-02 21:12:51 +02:00
JerryShih 0138441875 Bug 1368531 - Put the task gfxPlatformFontList::InitOtherFamilyNames() into idle queue. r=jfkthame
Add a boolean value in FindFamily() to check if gecko needs to defer the
InitOtherFamilyNames() task into idle queue.

Add a new telemetry data FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING for the
execution time of InitOtherFamilyNames() running regularly at main thread
instead of in idle queue.

MozReview-Commit-ID: A3YPDcHtXrX
2017-08-01 01:07:00 -04:00
Jonathan Kew e899441ccb Bug 1379444 - Use generic cmap-based font fallback if platform-specific code fails to find a usable font. r=lsalzman 2017-07-13 09:40:33 +01:00