зеркало из https://github.com/mozilla/gecko-dev.git
bug 721719 - ignore the GSUB table in Roboto on Android because of bad ligature rule. r=jdaggett
This commit is contained in:
Родитель
68abd2e005
Коммит
04aa7ad2df
|
@ -766,6 +766,14 @@ gfxFT2FontList::AppendFacesFromFontFile(nsCString& aFileName,
|
|||
if (family->IsBadUnderlineFamily()) {
|
||||
fe->mIsBadUnderlineFont = true;
|
||||
}
|
||||
|
||||
// bug 721719 - set the IgnoreGSUB flag on entries for Roboto
|
||||
// because of unwanted on-by-default "ae" ligature.
|
||||
// (See also AppendFaceFromFontListEntry.)
|
||||
if (name.EqualsLiteral("roboto")) {
|
||||
fe->mIgnoreGSUB = true;
|
||||
}
|
||||
|
||||
AppendToFaceList(faceList, name, fe);
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_ENABLED()) {
|
||||
|
@ -975,6 +983,17 @@ gfxFT2FontList::AppendFaceFromFontListEntry(const FontListEntry& aFLE,
|
|||
if (family->IsBadUnderlineFamily()) {
|
||||
fe->mIsBadUnderlineFont = true;
|
||||
}
|
||||
|
||||
// bug 721719 - set the IgnoreGSUB flag on entries for Roboto
|
||||
// because of unwanted on-by-default "ae" ligature.
|
||||
// This totally sucks, but if we don't hack around these broken fonts
|
||||
// we get really bad text rendering, which we can't inflict on users. :(
|
||||
// If we accumulate a few more examples of this stuff, it'll be time
|
||||
// to create some prefs for the list of fonts where we need to ignore
|
||||
// layout tables. Sigh.
|
||||
if (name.EqualsLiteral("roboto")) {
|
||||
fe->mIgnoreGSUB = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -207,6 +207,7 @@ public:
|
|||
mIsLocalUserFont(false), mStandardFace(aIsStandardFace),
|
||||
mSymbolFont(false),
|
||||
mIgnoreGDEF(false),
|
||||
mIgnoreGSUB(false),
|
||||
mWeight(500), mStretch(NS_FONT_STRETCH_NORMAL),
|
||||
#ifdef MOZ_GRAPHITE
|
||||
mCheckedForGraphiteTables(false),
|
||||
|
@ -240,6 +241,7 @@ public:
|
|||
bool IsItalic() const { return mItalic; }
|
||||
bool IsBold() const { return mWeight >= 600; } // bold == weights 600 and above
|
||||
bool IgnoreGDEF() const { return mIgnoreGDEF; }
|
||||
bool IgnoreGSUB() const { return mIgnoreGSUB; }
|
||||
|
||||
virtual bool IsSymbolFont();
|
||||
|
||||
|
@ -323,6 +325,7 @@ public:
|
|||
bool mStandardFace : 1;
|
||||
bool mSymbolFont : 1;
|
||||
bool mIgnoreGDEF : 1;
|
||||
bool mIgnoreGSUB : 1;
|
||||
|
||||
PRUint16 mWeight;
|
||||
PRInt16 mStretch;
|
||||
|
@ -357,6 +360,7 @@ protected:
|
|||
mStandardFace(false),
|
||||
mSymbolFont(false),
|
||||
mIgnoreGDEF(false),
|
||||
mIgnoreGSUB(false),
|
||||
mWeight(500), mStretch(NS_FONT_STRETCH_NORMAL),
|
||||
#ifdef MOZ_GRAPHITE
|
||||
mCheckedForGraphiteTables(false),
|
||||
|
|
|
@ -117,8 +117,14 @@ HBGetTable(hb_face_t *face, hb_tag_t aTag, void *aUserData)
|
|||
// bug 589682 - ignore the GDEF table in buggy fonts (applies to
|
||||
// Italic and BoldItalic faces of Times New Roman)
|
||||
if (aTag == TRUETYPE_TAG('G','D','E','F') &&
|
||||
font->GetFontEntry()->IgnoreGDEF())
|
||||
{
|
||||
font->GetFontEntry()->IgnoreGDEF()) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
// bug 721719 - ignore the GSUB table in buggy fonts (applies to Roboto,
|
||||
// at least on some Android ICS devices; set in gfxFT2FontList.cpp)
|
||||
if (aTag == TRUETYPE_TAG('G','S','U','B') &&
|
||||
font->GetFontEntry()->IgnoreGSUB()) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче