freetype
[Top][All Lists]
Advanced

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

Re: [ft] FT_Face::family/style name


From: mpsuzuki
Subject: Re: [ft] FT_Face::family/style name
Date: Fri, 16 Jan 2009 02:05:34 +0900

On Thu, 15 Jan 2009 09:45:05 +0000
Nik Napalm <address@hidden> wrote:

>Memory isn't an issue, it's mainly speed, I've no idea
>what is actually loaded and processed when FT_New_Face
>is invoked, this isn't an issue when you have a handfull
>of fonts, I was more concerned when enumerating thousands,
>so yes, I guess it does too much works for my purpose,
>it's no big deal but would be very very handy to scan
>a file just for it's name and have no other processing.


Hmm. FT_New_Face() & FT_Open_Face() examine various file formats
to determine the correct file formats, and examine many checks
to keep the applications from crash by broken fonts. So the first
step would be the reduction of the drivers to essential formats
only, by editing modules.cfg. Also, please disable Macintosh font
support by undefine FT_CONFIG_OPTION_MAC_FONTS in ftoption.h (it
tries various pathnames to access Macintosh resource fork by POSIX
API). 

After that, if you think still there are still too much works,
and if you only care the family & subfamily names in "name" table
and you don't care whether the font file is broken or not, I
recommend you to write your own TrueType parser. The parser in
FT2 is src/sfnt/ttload.c::tt_face_load_name().

Regards,
mpsuzuki




reply via email to

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