From 5ffac0cfc732b994e60af0b6b965b1780ca41f2e Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 15 Feb 2012 14:18:21 +0100 Subject: Don't render glyph with FT with fetchMetricsOnly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neither rendering with outline nor fetchMetricsOnly requires the rendering from FreeType so we don't need to render them or cache it. It should speed up recalcAdvances() quite a lot. Change-Id: Ic322507d54ab59020851e359088a4afa4e03c8db Reviewed-by: Samuel Rødal --- src/gui/text/qfontengine_ft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 0fd1848..c53e258 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -879,7 +879,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, if (err != FT_Err_Ok) qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph); - if (set->outline_drawing && fetchMetricsOnly) + if (set->outline_drawing || fetchMetricsOnly) return 0; FT_GlyphSlot slot = face->glyph; -- cgit v0.12