mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1692498 - Let the emoji font pref override Unicode presentation style only if it's explicitly user-set. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D105102
This commit is contained in:
parent
104874c6e2
commit
4a675c2c2f
@ -3329,12 +3329,14 @@ gfxFont* gfxFontGroup::FindFontForChar(uint32_t aCh, uint32_t aPrevCh,
|
||||
// 2. search pref fonts
|
||||
gfxFont* font = WhichPrefFontSupportsChar(aCh, aNextCh, presentation);
|
||||
if (font) {
|
||||
if (PrefersColor(presentation)) {
|
||||
// For emoji, always accept the font from preferences even if it isn't
|
||||
// actually a color-emoji font, as some users may explicitly choose to
|
||||
// set their emoji font preference to a monochrome font like Symbola.
|
||||
// So the font.name-list.emoji preference takes precedence over the
|
||||
// Unicode presentation style here.
|
||||
if (PrefersColor(presentation) &&
|
||||
Preferences::HasUserValue("font.name-list.emoji")) {
|
||||
// For emoji, always accept the font from preferences if it's explicitly
|
||||
// user-set, even if it isn't actually a color-emoji font, as some users
|
||||
// may want to set their emoji font preference to a monochrome font like
|
||||
// Symbola.
|
||||
// So a user-provided font.name-list.emoji preference takes precedence
|
||||
// over the Unicode presentation style here.
|
||||
RefPtr<gfxFont> autoRefDeref(candidateFont);
|
||||
*aMatchType = FontMatchType::Kind::kPrefsFallback;
|
||||
return font;
|
||||
|
@ -3,10 +3,6 @@
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
span {
|
||||
/* On Windows, we need to use the TwEmoji Mozilla font in preference to
|
||||
Segoe UI Emoji, as the latter doesn't support the Regional-Indicator
|
||||
flag ligatures. */
|
||||
font-family: TwEmoji Mozilla, sans-serif;
|
||||
font-size: 36px;
|
||||
font-kerning: none;
|
||||
}
|
||||
|
@ -3,10 +3,6 @@
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
span {
|
||||
/* On Windows, we need to use the TwEmoji Mozilla font in preference to
|
||||
Segoe UI Emoji, as the latter doesn't support the Regional-Indicator
|
||||
flag ligatures. */
|
||||
font-family: TwEmoji Mozilla, sans-serif;
|
||||
font-size: 36px;
|
||||
font-kerning: none;
|
||||
}
|
||||
|
@ -192,8 +192,7 @@ random-if(!winWidget) == arial-bold-lam-alef-1.html arial-bold-lam-alef-1-ref.ht
|
||||
fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1320665-cmap-format-13.html 1320665-cmap-format-13-ref.html # see bug 1320665 comments 8-9
|
||||
== 1331339-script-extensions-shaping-1.html 1331339-script-extensions-shaping-1-ref.html
|
||||
skip-if(!cocoaWidget) != 1349308-1.html 1349308-notref.html # macOS-specific test for -apple-system glyph metrics
|
||||
# 1463020-letter-spacing-text-transform-1 fails on Win10 because Segoe UI Emoji doesn't ligate regional-indicator characters to form flag symbols
|
||||
fails-if(/^^Windows\x20NT\x2010\.0/.test(http.oscpu)) fuzzy-if(Android,0-128,0-233) == 1463020-letter-spacing-text-transform-1.html 1463020-letter-spacing-text-transform-1-ref.html
|
||||
fuzzy-if(Android,0-128,0-233) == 1463020-letter-spacing-text-transform-1.html 1463020-letter-spacing-text-transform-1-ref.html
|
||||
fails-if(Android) == 1463020-letter-spacing-text-transform-2.html 1463020-letter-spacing-text-transform-2-ref.html # missing font coverage on Android
|
||||
== 1507661-spurious-hyphenation-after-explicit.html 1507661-spurious-hyphenation-after-explicit-ref.html
|
||||
fuzzy-if(!webrender,12-66,288-1681) fails-if(gtkWidget&&!webrender) == 1522857-1.html 1522857-1-ref.html # antialiasing fuzz in non-webrender cases
|
||||
|
@ -443,6 +443,9 @@ class RefTest(object):
|
||||
# mid-test, the extra reflow that is triggered can disrupt the test.
|
||||
prefs["gfx.font_loader.delay"] = 0
|
||||
prefs["gfx.font_loader.interval"] = 0
|
||||
# Ensure bundled fonts are activated, even if not enabled by default
|
||||
# on the platform, so that tests can rely on them.
|
||||
prefs["gfx.bundled-fonts.activate"] = 1
|
||||
# Disable dark scrollbars because it's semi-transparent.
|
||||
prefs["widget.disable-dark-scrollbar"] = True
|
||||
prefs["reftest.isCoverageBuild"] = mozinfo.info.get("ccov", False)
|
||||
|
Loading…
Reference in New Issue
Block a user