fields svg_documentĪ metrics object storing the size information. The glyph slot that has the SVG document loaded.Ī structure that models one SVG document. The hook must take into account the transformations that have been set, and translate the transformation matrices into the SVG coordinate system, as the original matrix is intended for the TTF/CFF coordinate system. If those are available, they had already been set, otherwise they have to be estimated and set manually. Typically, fonts have horizontal advances but not vertical ones. It is also expected to set all the metrics for the slot including the vertical advance if it is not already set. This hook is expected to preset the slot by setting parameters such as bitmap_left, bitmap_top, width, rows, pitch, and pixel_mode. Thus, if cache is TRUE, the hook can cache those calculations in a memory block referenced by the state pointer. This distinction has been made because many calculations that are necessary for presetting a glyph slot are the same needed later for the render callback hook. When it is the latter, the argument cache is set to TRUE. When it is the former, the argument cache is set to FALSE. Right before the svg module calls the render callback hook. When FT_Load_Glyph needs to preset the glyph slot. (* SVG_Lib_Preset_Slot_Func)( FT_GlyphSlot slot,Ī callback that is called to preset the glyph slot. sinceĭefined in FT_OTSVG_H (freetype/otsvg.h). data_pointer is essentially a pointer to that pointer such that it can be written to as well as read from.įreeType error code. The SVG rendering module stores a pointer variable that can be used by clients to store any data that needs to be shared across different hooks. It also sets the num_grays value as well as slot->format. The render hook is expected to render the SVG glyph to the bitmap buffer that is allocated already at slot->bitmap.buffer. The data necessary to render is available through the handle FT_SVG_Document, which is set in the other field of FT_GlyphSlotRec. This callback hook is called right after the preset hook SVG_Lib_Preset_Slot_Func has been called with cache set to TRUE. (* SVG_Lib_Render_Func)( FT_GlyphSlot slot,Ī callback that is called to render an OT-SVG glyph.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |