Backed out changeset 6153e6bb58e1 (bug 1558375) for causing 1229972.html to perma crash CLOSED TREE

This commit is contained in:
Ciure Andrei 2019-06-15 13:42:53 +03:00
Родитель b4c0f63508
Коммит 86d096eeef
5 изменённых файлов: 2 добавлений и 24 удалений

Просмотреть файл

@ -133,9 +133,6 @@ already_AddRefed<ScaledFont> UnscaledFontFreeType::CreateScaledFont(
}
int flags = FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING;
if (face->face_flags & FT_FACE_FLAG_TRICKY) {
flags &= ~FT_LOAD_NO_AUTOHINT;
}
cairo_font_face_t* font = cairo_ft_font_face_create_for_ft_face(
face, flags, coords.data(), aNumVariations);
if (cairo_font_face_status(font) != CAIRO_STATUS_SUCCESS) {

Просмотреть файл

@ -393,13 +393,9 @@ SkScalerContext_CairoFT::SkScalerContext_CairoFT(sk_sp<SkTypeface> typeface, con
}
}
// Disable autohinting when asked to disable hinting, except for "tricky" fonts.
// Disable autohinting to disable hinting even for "tricky" fonts.
if (!gFontHintingEnabled) {
CairoLockedFTFace faceLock(fScaledFont);
FT_Face face = faceLock.getFace();
if (!(face->face_flags & FT_FACE_FLAG_TRICKY)) {
loadFlags |= FT_LOAD_NO_AUTOHINT;
}
loadFlags |= FT_LOAD_NO_AUTOHINT;
}
if ((fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag) == 0) {

Просмотреть файл

@ -508,9 +508,6 @@ bool gfxFT2FontBase::GetFTGlyphAdvance(uint16_t aGID, int32_t* aAdvance) {
int32_t flags =
hinting ? FT_LOAD_ADVANCE_ONLY
: FT_LOAD_ADVANCE_ONLY | FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING;
if (face.get()->face_flags & FT_FACE_FLAG_TRICKY) {
flags &= ~FT_LOAD_NO_AUTOHINT;
}
FT_Error ftError = Factory::LoadFTGlyph(face.get(), aGID, flags);
if (ftError != FT_Err_Ok) {
// FT_Face was somehow broken/invalid? Don't try to access glyph slot.

Просмотреть файл

@ -383,9 +383,6 @@ FT2FontEntry* FT2FontEntry::CreateFontEntry(
int flags = gfxPlatform::GetPlatform()->FontHintingEnabled()
? FT_LOAD_DEFAULT
: (FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING);
if (aFace->face_flags & FT_FACE_FLAG_TRICKY) {
flags &= ~FT_LOAD_NO_AUTOHINT;
}
fe->mFontFace =
cairo_ft_font_face_create_for_ft_face(aFace, flags, nullptr, 0);
FTUserFontData* userFontData =
@ -427,9 +424,6 @@ cairo_font_face_t* FT2FontEntry::CairoFontFace(const gfxFontStyle* aStyle) {
int flags = gfxPlatform::GetPlatform()->FontHintingEnabled()
? FT_LOAD_DEFAULT
: (FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING);
if (FT_Face(face)->face_flags & FT_FACE_FLAG_TRICKY) {
flags &= ~FT_LOAD_NO_AUTOHINT;
}
mFontFace = cairo_ft_font_face_create_for_ft_face(face, flags, nullptr, 0);
auto userFontData =
new FTUserFontData(face, face.FontData(), face.DataLength());
@ -447,9 +441,6 @@ cairo_font_face_t* FT2FontEntry::CairoFontFace(const gfxFontStyle* aStyle) {
int flags = gfxPlatform::GetPlatform()->FontHintingEnabled()
? FT_LOAD_DEFAULT
: (FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING);
if (mFTFace->face_flags & FT_FACE_FLAG_TRICKY) {
flags &= ~FT_LOAD_NO_AUTOHINT;
}
// Resolve variations from entry (descriptor) and style (property)
AutoTArray<gfxFontVariation, 8> settings;
GetVariationsForStyle(settings, aStyle ? *aStyle : gfxFontStyle());

Просмотреть файл

@ -204,9 +204,6 @@ void gfxFT2Font::FillGlyphDataForChar(FT_Face face, uint32_t ch,
FT_Int32 flags = gfxPlatform::GetPlatform()->FontHintingEnabled()
? FT_LOAD_DEFAULT
: (FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING);
if (face->face_flags & FT_FACE_FLAG_TRICKY) {
flags &= ~FT_LOAD_NO_AUTOHINT;
}
FT_Error err = Factory::LoadFTGlyph(face, gid, flags);
if (err) {