next up previous contents index
Next: The X11-Interface Up: Using t1lib Previous: t1lib-Errors   Contents   Index


Other Useful Functions

This subsection describes a few functions that had not been described up to now but which however could be useful.

 int T1_CheckEndian( void)

to 0pt \fbox{$\mathcal{F}()\Rightarrow$} This function may be used to check the endianess of the hardware t1lib is running on. The return value is 0 for Little Endian and 1 for Big Endian machines.

 void T1_DumpGlyph( GLYPH *glyph)

to 0pt \fbox{$\mathcal{F}()\Rightarrow$} This function might be useful for debugging and testing t1lib. It dumps an ASCII representation of the glyph pointed to by glyph to the standard output. A background pixel is represented by . while a foreground pixel is represented by X. After the number of bits that correspond to the current padding value, an empty column is inserted. See the output of the programming example in [*]. In this case the padding values has been 16.

Note that the size of the glyph should be small enough that its padded width does not exceed the terminals line width. Otherwise the result might become illegible.

 void T1_DumpPath( T1_OUTLINE *path)

to 0pt \fbox{$\mathcal{F}()\Rightarrow$} This function dumps a description of an outline to the standard output. It is exclusively intended for debugging purposes.

 void T1_SetRasterFlags( int flags)

to 0pt \fbox{$\mathcal{F}()\Rightarrow$} This function allows to enable or disable certain features of the rasterizer. Let me emphasize that this is exclusively intended for debugging and error tracking. The default value of flags is 0 which means that no debugging output is shown and hinting is performed as suggested in the Adobe Type Font Format. However there may arise situations where fiddling with the flags might be helpful in rasterizer and font debugging.

flags usually is an OR'ed combination of the following definitions:

The T1_IGNORE_... types allow to selectively disable hinting. They might be useful if parts of a font are not properly rendered. For example, substituting a font's alignment zones by the family's alignment zones might result in visual artifacts if the values for FamilyBlues are not correct. Disabling family alignment might reveal the problem in such cases.

The T1_DEBUG_... types produce debugging output from the intermediate rasterizing steps. Notice that to understand this output a thorough understanding of what happens in the rasterizer is in force. Moreover, be prepared that thousands of lines might be written to the terminal, depending on the particular option.


next up previous contents index
Next: The X11-Interface Up: Using t1lib Previous: t1lib-Errors   Contents   Index
2004-10-04