зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1460858 - Fix serialization/deserialization of SlantStyle for the Android startupCache, to ensure proper styled face selection. r=jwatt
This commit is contained in:
Родитель
76570152bf
Коммит
39f95c038d
|
@ -347,8 +347,9 @@ public:
|
|||
return Oblique(angle);
|
||||
}
|
||||
// Not recognized as an oblique angle; maybe it's from a startup-cache
|
||||
// created by an older version. Just treat it as 'normal'.
|
||||
return Normal();
|
||||
// created by an older version. The style field there used a simple 0/1
|
||||
// for normal/italic respectively.
|
||||
return aString[0] == '0' ? Normal() : Italic();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1060,7 +1060,11 @@ AppendToFaceList(nsCString& aFaceList,
|
|||
aFaceList.Append(',');
|
||||
aFaceList.AppendInt(aFontEntry->mFTFontIndex);
|
||||
aFaceList.Append(',');
|
||||
aFaceList.Append(aFontEntry->IsItalic() ? '1' : '0');
|
||||
// Note that ToString() appends to the destination string without
|
||||
// replacing existing contents (see FontPropertyTypes.h)
|
||||
aFontEntry->SlantStyle().Min().ToString(aFaceList);
|
||||
aFaceList.Append(':');
|
||||
aFontEntry->SlantStyle().Max().ToString(aFaceList);
|
||||
aFaceList.Append(',');
|
||||
aFaceList.AppendFloat(aFontEntry->Weight().Min().ToFloat());
|
||||
aFaceList.Append(':');
|
||||
|
|
Загрузка…
Ссылка в новой задаче