[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Accelerate TrueType interpreter with JIT compiling?
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Accelerate TrueType interpreter with JIT compiling? |
Date: |
Sun, 10 Aug 2014 22:06:49 +0200 (CEST) |
>> [...] TrueType hinting is done by a byte-code interpreter
>> (ttinterp). My question is, is it worth to accelerate this process
>> by JIT?
>
> I highly doubt.
I second that. What's most important is caching of the processed
glyphs.
> May I ask the purpose of this interpreter?
To move points within a glyph so that it's better hinted.
> Is it only used for font loading, or has other purposes?
It's normally not executed at font loading time, but at glyph loading
time.
> Is the same program runs for all glyphs for the same font (or
> multiple fonts)?
There are three parts: A generic one (in the `fpgm' table, usually
defining functions), a global one (in the `prep' table, to be executed
right after setting a ppem value), and a local one (the real
instructions for every glyph, located in the `glyf' table).
> What is the typical program length (number of bytecode
> instructions)?
It depends. For extensive manual hinting that covers B/W, grayscale,
and ClearType rendering, it can be more than 500 bytes per glyph.
> Do you have any measurements about the ratio of interpreted runtime
> compared to the total time consumed by freetype?
No, but hinting is quite slow.
Werner