summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-09-07 23:26:14 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-10-18 20:41:31 +0200
commit66104ff9856ff1c81ec8c776a0467796f85efc01 (patch)
treec3be8425a393cbc6f96af8e43f24f9e783d74524 /vcl
parent26e799a3f747723b428c29fbc314d5c42f12c030 (diff)
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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index b502d9118155..a303f707e7dd 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -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
{