ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ftpfr.h
Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftpfr.h                                                                */
00004 /*                                                                         */
00005 /*    FreeType API for accessing PFR-specific data (specification only).   */
00006 /*                                                                         */
00007 /*  Copyright 2002, 2003, 2004, 2006, 2008, 2009 by                        */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef __FTPFR_H__
00020 #define __FTPFR_H__
00021 
00022 #include <ft2build.h>
00023 #include FT_FREETYPE_H
00024 
00025 #ifdef FREETYPE_H
00026 #error "freetype.h of FreeType 1 has been loaded!"
00027 #error "Please fix the directory search order for header files"
00028 #error "so that freetype.h of FreeType 2 is found first."
00029 #endif
00030 
00031 
00032 FT_BEGIN_HEADER
00033 
00034 
00035   /*************************************************************************/
00036   /*                                                                       */
00037   /* <Section>                                                             */
00038   /*    pfr_fonts                                                          */
00039   /*                                                                       */
00040   /* <Title>                                                               */
00041   /*    PFR Fonts                                                          */
00042   /*                                                                       */
00043   /* <Abstract>                                                            */
00044   /*    PFR/TrueDoc specific API.                                          */
00045   /*                                                                       */
00046   /* <Description>                                                         */
00047   /*    This section contains the declaration of PFR-specific functions.   */
00048   /*                                                                       */
00049   /*************************************************************************/
00050 
00051 
00052  /**********************************************************************
00053   *
00054   * @function:
00055   *    FT_Get_PFR_Metrics
00056   *
00057   * @description:
00058   *    Return the outline and metrics resolutions of a given PFR face.
00059   *
00060   * @input:
00061   *    face :: Handle to the input face.  It can be a non-PFR face.
00062   *
00063   * @output:
00064   *    aoutline_resolution ::
00065   *      Outline resolution.  This is equivalent to `face->units_per_EM'
00066   *      for non-PFR fonts.  Optional (parameter can be NULL).
00067   *
00068   *    ametrics_resolution ::
00069   *      Metrics resolution.  This is equivalent to `outline_resolution'
00070   *      for non-PFR fonts.  Optional (parameter can be NULL).
00071   *
00072   *    ametrics_x_scale ::
00073   *      A 16.16 fixed-point number used to scale distance expressed
00074   *      in metrics units to device sub-pixels.  This is equivalent to
00075   *      `face->size->x_scale', but for metrics only.  Optional (parameter
00076   *      can be NULL).
00077   *
00078   *    ametrics_y_scale ::
00079   *      Same as `ametrics_x_scale' but for the vertical direction.
00080   *      optional (parameter can be NULL).
00081   *
00082   * @return:
00083   *    FreeType error code.  0~means success.
00084   *
00085   * @note:
00086   *   If the input face is not a PFR, this function will return an error.
00087   *   However, in all cases, it will return valid values.
00088   */
00089   FT_EXPORT( FT_Error )
00090   FT_Get_PFR_Metrics( FT_Face    face,
00091                       FT_UInt   *aoutline_resolution,
00092                       FT_UInt   *ametrics_resolution,
00093                       FT_Fixed  *ametrics_x_scale,
00094                       FT_Fixed  *ametrics_y_scale );
00095 
00096 
00097  /**********************************************************************
00098   *
00099   * @function:
00100   *    FT_Get_PFR_Kerning
00101   *
00102   * @description:
00103   *    Return the kerning pair corresponding to two glyphs in a PFR face.
00104   *    The distance is expressed in metrics units, unlike the result of
00105   *    @FT_Get_Kerning.
00106   *
00107   * @input:
00108   *    face  :: A handle to the input face.
00109   *
00110   *    left  :: Index of the left glyph.
00111   *
00112   *    right :: Index of the right glyph.
00113   *
00114   * @output:
00115   *    avector :: A kerning vector.
00116   *
00117   * @return:
00118   *    FreeType error code.  0~means success.
00119   *
00120   * @note:
00121   *    This function always return distances in original PFR metrics
00122   *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
00123   *    mode, which always returns distances converted to outline units.
00124   *
00125   *    You can use the value of the `x_scale' and `y_scale' parameters
00126   *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
00127   */
00128   FT_EXPORT( FT_Error )
00129   FT_Get_PFR_Kerning( FT_Face     face,
00130                       FT_UInt     left,
00131                       FT_UInt     right,
00132                       FT_Vector  *avector );
00133 
00134 
00135  /**********************************************************************
00136   *
00137   * @function:
00138   *    FT_Get_PFR_Advance
00139   *
00140   * @description:
00141   *    Return a given glyph advance, expressed in original metrics units,
00142   *    from a PFR font.
00143   *
00144   * @input:
00145   *    face   :: A handle to the input face.
00146   *
00147   *    gindex :: The glyph index.
00148   *
00149   * @output:
00150   *    aadvance :: The glyph advance in metrics units.
00151   *
00152   * @return:
00153   *    FreeType error code.  0~means success.
00154   *
00155   * @note:
00156   *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
00157   *    to convert the advance to device sub-pixels (i.e., 1/64th of pixels).
00158   */
00159   FT_EXPORT( FT_Error )
00160   FT_Get_PFR_Advance( FT_Face   face,
00161                       FT_UInt   gindex,
00162                       FT_Pos   *aadvance );
00163 
00164  /* */
00165 
00166 
00167 FT_END_HEADER
00168 
00169 #endif /* __FTPFR_H__ */
00170 
00171 
00172 /* END */

Generated on Mon May 28 2012 04:33:31 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.