Bug 1522857 - Ensure the CHAR_IS_SPACE flag is set properly in the textrun's mCharacterGlyphs array even when the space glyph does not fit into a simple CompressedGlyph record. r=jrmuizel

This commit is contained in:
Jonathan Kew 2019-01-26 15:48:38 +00:00
parent 28923de147
commit 3a5283ff8f
2 changed files with 4 additions and 0 deletions

View File

@ -3061,6 +3061,9 @@ bool gfxFont::SplitAndInitTextRun(
flags | gfx::ShapedTextFlags::TEXT_IS_8BIT, rounding, tp);
if (sw) {
aTextRun->CopyGlyphDataFrom(sw, aRunStart + i);
if (boundary == ' ') {
aTextRun->GetCharacterGlyphs()[aRunStart + i].SetIsSpace();
}
} else {
return false;
}

View File

@ -1536,6 +1536,7 @@ void gfxTextRun::SetSpaceGlyph(gfxFont* aFont, DrawTarget* aDrawTarget,
AddGlyphRun(aFont, gfxTextRange::MatchType::kFontGroup, aCharIndex, false,
aOrientation);
CopyGlyphDataFrom(sw, aCharIndex);
GetCharacterGlyphs()[aCharIndex].SetIsSpace();
}
}