[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] parallel glyph rendering
From: |
Werner LEMBERG |
Subject: |
Re: [ft] parallel glyph rendering |
Date: |
Thu, 28 May 2009 10:08:21 +0200 (CEST) |
> 1. I want to create a bunch of glyph bitmaps quickly (so the
> sequence FT_Get_Char_Index, FT_Load_Glyph, FT_Render_Glyph,
> FT_Get_Glyph for a bunch of font/size/character combinations). Can
> I do anything lighter weight than multiple library objects?
AFAIK, no.
> Some reason I thought that the finest granularity is an FT_Face
> object, but I'm getting seg faults when I assign one Face per
> thread.
Hmm. In the documentation of FT_Library you can find this:
For multi-threading applications each thread should have its own
FT_Library object.
How comes that you got a different impression?
> If it is indeed still possible, the documentation mentioned changing
> a macro in <arch>/.../ftbuild.h to make a Library obj reentrant, but
> I didn't see anything in there -- any hints on what to change?
Where did you find this? I can't find this in the FreeType 2
documentation.
> 2. If there is no finer granularity (as suggested by a message
> earlier this week) and I need to use multiple Library objects, are
> there any special flags / edits for supporting multiple libraries?
> [Perhaps the ftbuild.h note was for this?]
ftbuild.h? This file has been replaced with ft2build.h about 9 years
ago, I think. And no, there are no special flags needed to support
multiple libraries.
> 3. Finally, perhaps I'm going about this wrong. Any suggested path
> for basic rendering of a bunch of glyphs of a few fonts (each at
> various sizes)? My approach was to use the call sequence mentioned
> above en masse, iterating by: font, size, glyph. E.g., for better,
> cache behavior, it might be better to iterate font/glyph/size.
font/size/glyph should be better at rendering time, at least for
TrueType fonts. Reason: Selecting a different size makes the TrueType
interpreter run the font's `prep' table again.
> I'll post whatever I get working because this is sort of basic
> functionality :)
Thanks.
Werner