mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 00:02:37 +00:00
Bug 1696504 - Force the deprecated macOS font-family names to be handled, for consistent behavior when built with newer SDKs. r=mstange
In my local builds, making this conditional on MAC_OS_X_VERSION_MIN_REQUIRED seemed to work fine, but tryserver doesn't agree. So I think the simplest/safest way forward is just to unconditionally include the deprecated names. If Core Text *is* exposing them in any given build, the duplicates will just be dropped, so it's harmless enough, and avoids being dependent on quirks of different SDK behavior. Differential Revision: https://phabricator.services.mozilla.com/D147416
This commit is contained in:
parent
e50debd6fd
commit
c27e5bbd8b
@ -86,8 +86,11 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
// Determine whether to add the deprecated names to the list, depending on build-time SDK options.
|
||||
#define USE_DEPRECATED_FONT_FAMILY_NAMES !(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15)
|
||||
// Building with newer macOS SDKs can cause a bunch of font-family names to be hidden
|
||||
// from the Core Text API we use to enumerate available fonts. Because some content still
|
||||
// benefits from having these names recognized, we forcibly include them in the list.
|
||||
// Some day we might want to drop support for these.
|
||||
#define USE_DEPRECATED_FONT_FAMILY_NAMES 1
|
||||
|
||||
#if USE_DEPRECATED_FONT_FAMILY_NAMES
|
||||
// List generated by diffing the arrays returned by CTFontManagerCopyAvailableFontFamilyNames()
|
||||
|
Loading…
x
Reference in New Issue
Block a user