From 4bb802063579cbbbaa22ddf5001429459c994c01 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 23 Aug 2007 04:38:34 +0000 Subject: [PATCH] (mfont__flt_run): Don't calculate a glyph metric if the glyph is already handled by OTF. --- src/font-flt.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/font-flt.c b/src/font-flt.c index ed14d9e..e0668d8 100644 --- a/src/font-flt.c +++ b/src/font-flt.c @@ -1552,7 +1552,18 @@ mfont__flt_run (MGlyphString *gstring, int from, int to, MRealizedFace *rface) if (MDEBUG_FLAG ()) { MDEBUG_PRINT ("\n [FLT] (RESULT"); - mfont__get_metric (gstring, from, to); + for (i = from; i < to;) + { + if (MGLYPH (i)->otf_encoded) + i++; + else + { + int j = i++; + + while (i < to && ! MGLYPH (i)->otf_encoded) i++; + mfont__get_metric (gstring, j, i); + } + } if (MDEBUG_FLAG () > 1) for (i = 0; from < to; from++, i++) { -- 1.7.10.4