|
cheshirekow
v0.1.0
|
A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions Open_Face_t& and Attach_Stream_t&. More...
#include <cpp_freetype/OpenArgs.h>
Public Member Functions | |
| Module & | driver () |
| A handle to a source stream object. More... | |
| UInt_t & | flags () |
| A set of bit flags indicating how to use the structure. More... | |
| const Byte_t *& | memory_base () |
| The first byte of the file in memory. More... | |
| Long_t & | memory_size () |
| The size in bytes of the file in memory. More... | |
| Int_t & | num_params () |
| The number of extra parameters. More... | |
| String_t *& | pathname () |
| A pointer to an 8-bit file pathname. More... | |
Private Attributes | |
| void * | m_ptr |
| pointer to the underlying object More... | |
A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions Open_Face_t& and Attach_Stream_t&.
The stream type is determined by the contents of ‘flags’ which are tested in the following order by FT_Open_Face:
If the ‘FT_OPEN_MEMORY’ bit is set, assume that this is a memory file of ‘memory_size’ bytes, located at ‘memory_address’. The data are are not copied, and the client is responsible for releasing and destroying them after the corresponding call to FT_Done_Face.
Otherwise, if the ‘FT_OPEN_STREAM’ bit is set, assume that a custom input stream ‘stream’ is used.
Otherwise, if the ‘FT_OPEN_PATHNAME’ bit is set, assume that this is a normal file and use ‘pathname’ to open it.
If the ‘FT_OPEN_DRIVER’ bit is set, FT_Open_Face only tries to open the file with the driver whose handler is in ‘driver’.
If the ‘FT_OPEN_PARAMS’ bit is set, the parameters given by ‘num_params’ and ‘params’ is used. They are ignored otherwise.
Ideally, both the ‘pathname’ and ‘params’ fields should be tagged as ‘const’; this is missing for API backwards compatibility. In other words, applications should treat them as read-only.
Definition at line 66 of file OpenArgs.h.
| Module& freetype::OpenArgs::driver | ( | ) |
A handle to a source stream object.
This field is exclusively used by FT_Open_Face; it simply specifies the font driver to use to open the face. If set to 0, FreeType tries to load the face with each one of the drivers in its list.
| UInt_t& freetype::OpenArgs::flags | ( | ) |
A set of bit flags indicating how to use the structure.
| const Byte_t*& freetype::OpenArgs::memory_base | ( | ) |
The first byte of the file in memory.
| Long_t& freetype::OpenArgs::memory_size | ( | ) |
The size in bytes of the file in memory.
| Int_t& freetype::OpenArgs::num_params | ( | ) |
The number of extra parameters.
| String_t*& freetype::OpenArgs::pathname | ( | ) |
A pointer to an 8-bit file pathname.
|
private |
pointer to the underlying object
Definition at line 69 of file OpenArgs.h.