[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] FT_Open_Face with negative face_index
From: |
David Turner |
Subject: |
Re: [ft] FT_Open_Face with negative face_index |
Date: |
Sun, 15 May 2005 19:08:22 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
David Osborn a écrit :
The FreeType2 docs mention that, if the face_index parameter of
FT_Open_Face is negative, '* face', which I'm assuming refers to the
function's 'aface' parameter, will not be filled in. See:
http://freetype.sourceforge.net/freetype2/docs/reference/ft2-base_interface.html#FT_Open_Face
(look under the 'note' heading). This suggests that I should be able to
pass a null pointer as the aface parameter since its not going to be
used anyway. However, the function fails if I do that, so my assumption
must be wrong. If I pass it a real pointer to an FT_Face instance, it
fills it in even though the face_index is negative (the docs say it
'will not return any face handle' in this case). FT_Open_Face seems to
operate as if the face_index were 0 even if I pass -1. The only
possibility I can think of is if I'm misinterpreting what '* face' means
in the docs. Any suggestions?
David, the purpose of a negative face index is to be able to very
quickly test wether a font file's format is supported by the version
of FT2 you're linking with.
If it's unsupported, the function will return an error.
If it's supported, it will return 0, and fill the FT_Face with
only a very limited set of fields (i.e. 'face->num_faces').
Regards,
- David Turner
- The FreeType Project (www.freetype.org)