Kaydet (Commit) 66104ff9 authored tarafından Khaled Hosny's avatar Khaled Hosny

Don’t check glyph class unnecessarily

Don’t call hb_ot_layout_get_glyph_class() unless the glyph advance width
is zero, as we really do not use its result otherwise.

Change-Id: Id02238abef91b9343931f1886d54d966d7157f25
üst 26e799a3
......@@ -442,9 +442,8 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
if (hb_ot_layout_has_glyph_classes(pHbFace))
{
// the font has GDEF table
bool bMark = hb_ot_layout_get_glyph_class(pHbFace, nGlyphIndex) == HB_OT_LAYOUT_GLYPH_CLASS_MARK;
if (bMark && pHbPositions[i].x_advance == 0)
bDiacritic = true;
if (pHbPositions[i].x_advance == 0)
bDiacritic = hb_ot_layout_get_glyph_class(pHbFace, nGlyphIndex) == HB_OT_LAYOUT_GLYPH_CLASS_MARK;
}
else
{
......
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