freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Loading new Face and accessing glyph metrics (performance)


From: Stephan Bouchard
Subject: [ft] Loading new Face and accessing glyph metrics (performance)
Date: Sat, 21 Jul 2018 15:39:21 -0700

Hi!

 

When accessing glyph metrics after loading a new face using FT_New_Face vs.
FT_New_Memory_Face, I get much better performance from FT_New_Memory_Face
which I am surprised by given at this point the face has been loaded. I
would expect loading it the first time from disk is slower but afterwards,
accessing other glyph metrics should be the same between the two.

 

Why am I seeing a performance difference here?

 

In addition, after the face has been loaded using FT_New_Memory_Face, I get
significant performance differences when accessing glyph metrics between
different font files. For instance, getting the metrics for the letter "A"
from Arial.ttf is 0.08ms vs. 0.018ms for Segoeui.ttf vs. 0.0035ms using
Anton.ttf. 

 

Again why the differences here? All these fonts are using Unicode encoding,
Arial has about the same number of glyphs as Segoeui so I would not expect
much difference here.

 

To load the glyphs, I am using FT_LOAD_COMPUTE_METRICS which I presume is
the most efficient option if all I need is metrics for a given size / glyph.

 

I am using FreeType version 2.8.1 right now.

 

 

Regards,

 

 

Stephan 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]