Commit ee95241a authored by Tooru Fujisawa's avatar Tooru Fujisawa
Browse files

Bug 1697666 - Move IsSingleFaceFamily into gfxFontFamily. r=jfkthame, a=jcristau

Differential Revision: https://phabricator.services.mozilla.com/D108810
parent 5686ee1c
......@@ -934,6 +934,8 @@ class gfxFontFamily {
}
}
virtual bool IsSingleFaceFamily() const { return false; }
bool IsBadUnderlineFamily() const { return mIsBadUnderlineFamily; }
bool CheckForFallbackFaces() const { return mCheckForFallbackFaces; }
......
......@@ -584,8 +584,6 @@ class gfxMacFontFamily final : public gfxFontFamily {
virtual void FindStyleVariations(FontInfoData* aFontInfoData = nullptr);
virtual bool IsSingleFaceFamily() const { return false; }
protected:
double mSizeHint;
};
......@@ -933,7 +931,7 @@ void gfxMacPlatformFontList::ReadSystemFontList(nsTArray<FontFamilyListEntry>* a
}
// Now collect the list of available families, with visibility attributes.
for (auto f = mFontFamilies.Iter(); !f.Done(); f.Next()) {
auto macFamily = static_cast<gfxMacFontFamily*>(f.Data().get());
auto macFamily = f.Data().get();
if (macFamily->IsSingleFaceFamily()) {
continue; // skip, this will be recreated separately in the child
}
......
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<style type="text/css">
textarea { font-family: serif; font-size: 72pt; }
</style>
</head>
<body><textarea>海の絵</textarea></body>
</html>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<style type="text/css">
textarea { font-family: "Osaka-Mono", serif; font-size: 72pt; }
</style>
</head>
<body><textarea>海の絵</textarea></body>
</html>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<style type="text/css">
textarea { font-family: "Osaka-Mono"; font-size: 72pt; }
</style>
</head>
<body><textarea>海の絵</textarea></body>
</html>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<style type="text/css">
textarea { font-size: 72pt; }
</style>
</head>
<body><textarea>海の絵</textarea></body>
</html>
......@@ -163,5 +163,10 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == descriptor-ranges.html d
# Test that prefs font fallback respects the CSS generic from content (bug 1687426)
skip-if(Android) == fallback-respects-generic-1.html fallback-respects-generic-1-ref.html # fonts present on Android are too unpredictable for easy testing
# Japanese monospace font on macOS is Osaka-mono
# Disabled because Osaka-Mono isn't available on automation.
# skip-if(!cocoaWidget) == osaka-mono.html osaka-mono-ref.html
# skip-if(!cocoaWidget) != osaka-mono-exists.html osaka-mono-exists-ref.html
# Reset default prefs.
defaults
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment