freetype
[Top][All Lists]
Advanced

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

[ft] Faster computation of text width?


From: John Found
Subject: [ft] Faster computation of text width?
Date: Fri, 13 Mar 2015 00:42:17 +0200

According to the FreeType documentation, the fastest way to compute the width 
of some text string is to use
FT_Get_Advance function that returns the advance values without loading and 
rendering the glyphs.

But working on this task, I figured out, that using the cache sub-system and 
loading the whole images with
"FTC_ImageCache_Lookup" and using the advance from the loaded image is faster 
than the above function. 

And faster at least 5..10 times!

Is it expected behaviour or I am using FT_Get_Advance not properly?

-- 
http://fresh.flatassembler.net
http://asm32.info
John Found <address@hidden>



reply via email to

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