Content-type: text/html Manpage of FT_GlyphSlotRec

FT_GlyphSlotRec

Section: Misc. Reference Manual Pages (3)
Index Return to Main Contents
 

NAME

FT_GlyphSlotRec  

SYNOPSIS


library :: A handle to the FreeType library instance this slot belongs to.  

face :: A handle to the parent face object.  

next :: In some cases (like some font tools), several  glyph slots per face object can be a good  thing.  As this is rare, the glyph slots are  listed through a direct, single-linked list  using its `next' field.  

generic :: A typeless pointer which is unused by the  FreeType library or any of its drivers.  It  can be used by client applications to link  their own data to each glyph slot object.  

metrics :: The metrics of the last loaded glyph in the  slot.  The returned values depend on the last  load flags (see the FT_Load_Glyph() API  function) and can be expressed either in 26.6  fractional pixels or font units.  Note that even when the glyph image is  transformed, the metrics are not.  

linearHoriAdvance :: For scalable formats only, this field holds  the linearly scaled horizontal advance width  for the glyph (i.e. the scaled and unhinted  value of the hori advance).  This can be  important to perform correct WYSIWYG layout.  Note that this value is expressed by default  in 16.16 pixels. However, when the glyph is  loaded with the FT_LOAD_LINEAR_DESIGN flag,  this field contains simply the value of the  advance in original font units.  

linearVertAdvance :: For scalable formats only, this field holds  the linearly scaled vertical advance height  for the glyph.  See linearHoriAdvance for  comments.  

advance :: This is the transformed advance width for the  glyph.  

format :: This field indicates the format of the image  contained in the glyph slot.  Typically  ft_glyph_format_bitmap,  ft_glyph_format_outline, and  ft_glyph_format_composite, but others are  possible.  

bitmap :: This field is used as a bitmap descriptor  when the slot format is  ft_glyph_format_bitmap.  Note that the  address and content of the bitmap buffer can  change between calls of FT_Load_Glyph() and a  few other functions.  

bitmap_left :: This is the bitmap's left bearing expressed  in integer pixels.  Of course, this is only  valid if the format is  ft_glyph_format_bitmap.  

bitmap_top :: This is the bitmap's top bearing expressed in  integer pixels.  Remember that this is the  distance from the baseline to the top-most  glyph scanline, upwards y-coordinates being  *positive*.  

outline :: The outline descriptor for the current glyph  image if its format is  ft_glyph_bitmap_outline.  

num_subglyphs :: The number of subglyphs in a composite glyph.  This format is only valid for the composite  glyph format, that should normally only be  loaded with the FT_LOAD_NO_RECURSE flag.  

subglyphs :: An array of subglyph descriptors for  composite glyphs.  There are `num_subglyphs'  elements in there.  

control_data :: Certain font drivers can also return the  control data for a given glyph image (e.g.  TrueType bytecode, Type 1 charstrings, etc.).  This field is a pointer to such data.  

control_len :: This is the length in bytes of the control  data.  

other :: Really wicked formats can use this pointer to  present their own glyph image to client apps.  Note that the app will need to know about the  image format. 
 

DESCRIPTION

FreeType root glyph slot class structure. A glyph slot is a container where individual glyphs can be loaded, be they vectorial or bitmap/graymaps. FreeType root glyph slot class structure. A glyph slot is a container where individual glyphs can be loaded, be they vectorial or bitmap/graymaps.

Notes: If @FT_Load_Glyph() is called with default flags (see @FT_LOAD_DEFAULT ) the glyph image is loaded in the glyph slot in its native format (e.g. a vectorial outline for TrueType and Type 1 formats). This image can later be converted into a bitmap by calling FT_Render_Glyph(). This function finds the current renderer for the native image's format then invokes it. The renderer is in charge of transforming the native image through the slot's face transformation fields, then convert it into a bitmap that is returned in `slot->bitmap'. Note that `slot->bitmap_left' and `slot->bitmap_top' are also used to specify the position of the bitmap relative to the current pen position (e.g. coordinates [0,0] on the baseline). Of course, `slot->format' is also changed to `ft_glyph_format_bitmap' . typedef struct FT_GlyphSlotRec_ { FT_Library library; FT_Face face; FT_GlyphSlot next; FT_UInt flags; FT_Generic generic; FT_Glyph_Metrics metrics; FT_Fixed linearHoriAdvance; FT_Fixed linearVertAdvance; FT_Vector advance; FT_Glyph_Format format; FT_Bitmap bitmap; FT_Int bitmap_left; FT_Int bitmap_top; FT_Outline outline; FT_UInt num_subglyphs; FT_SubGlyph* subglyphs; void* control_data; long control_len; void* other; FT_Slot_Internal internal; } FT_GlyphSlotRec; F U N C T I O N S  

VERSION

This documentation was generated for Freetype 2.0.4 by autodocbook (http://www.stillhq.com). Autodocbook is (c) Michael Still 2001.
      

AUTHOR

Copyright 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg.
    

This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully.  

BUGS

Please report errors in this documentation, and Freetype itself to freetype@freetype.org


 

Index

NAME
SYNOPSIS
DESCRIPTION
VERSION
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 04:44:37 GMT, July 26, 2001