michael@0: /***************************************************************************/ michael@0: /* */ michael@0: /* ftpfr.h */ michael@0: /* */ michael@0: /* FreeType API for accessing PFR-specific data (specification only). */ michael@0: /* */ michael@0: /* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ michael@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ michael@0: /* */ michael@0: /* This file is part of the FreeType project, and may only be used, */ michael@0: /* modified, and distributed under the terms of the FreeType project */ michael@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ michael@0: /* this file you indicate that you have read the license and */ michael@0: /* understand and accept it fully. */ michael@0: /* */ michael@0: /***************************************************************************/ michael@0: michael@0: michael@0: #ifndef __FTPFR_H__ michael@0: #define __FTPFR_H__ michael@0: michael@0: #include michael@0: #include FT_FREETYPE_H michael@0: michael@0: #ifdef FREETYPE_H michael@0: #error "freetype.h of FreeType 1 has been loaded!" michael@0: #error "Please fix the directory search order for header files" michael@0: #error "so that freetype.h of FreeType 2 is found first." michael@0: #endif michael@0: michael@0: michael@0: FT_BEGIN_HEADER michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /*
*/ michael@0: /* pfr_fonts */ michael@0: /* */ michael@0: /* */ michael@0: /* PFR Fonts */ michael@0: /* */ michael@0: /* <Abstract> */ michael@0: /* PFR/TrueDoc specific API. */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* This section contains the declaration of PFR-specific functions. */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: /********************************************************************** michael@0: * michael@0: * @function: michael@0: * FT_Get_PFR_Metrics michael@0: * michael@0: * @description: michael@0: * Return the outline and metrics resolutions of a given PFR face. michael@0: * michael@0: * @input: michael@0: * face :: Handle to the input face. It can be a non-PFR face. michael@0: * michael@0: * @output: michael@0: * aoutline_resolution :: michael@0: * Outline resolution. This is equivalent to `face->units_per_EM' michael@0: * for non-PFR fonts. Optional (parameter can be NULL). michael@0: * michael@0: * ametrics_resolution :: michael@0: * Metrics resolution. This is equivalent to `outline_resolution' michael@0: * for non-PFR fonts. Optional (parameter can be NULL). michael@0: * michael@0: * ametrics_x_scale :: michael@0: * A 16.16 fixed-point number used to scale distance expressed michael@0: * in metrics units to device sub-pixels. This is equivalent to michael@0: * `face->size->x_scale', but for metrics only. Optional (parameter michael@0: * can be NULL). michael@0: * michael@0: * ametrics_y_scale :: michael@0: * Same as `ametrics_x_scale' but for the vertical direction. michael@0: * optional (parameter can be NULL). michael@0: * michael@0: * @return: michael@0: * FreeType error code. 0~means success. michael@0: * michael@0: * @note: michael@0: * If the input face is not a PFR, this function will return an error. michael@0: * However, in all cases, it will return valid values. michael@0: */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Get_PFR_Metrics( FT_Face face, michael@0: FT_UInt *aoutline_resolution, michael@0: FT_UInt *ametrics_resolution, michael@0: FT_Fixed *ametrics_x_scale, michael@0: FT_Fixed *ametrics_y_scale ); michael@0: michael@0: michael@0: /********************************************************************** michael@0: * michael@0: * @function: michael@0: * FT_Get_PFR_Kerning michael@0: * michael@0: * @description: michael@0: * Return the kerning pair corresponding to two glyphs in a PFR face. michael@0: * The distance is expressed in metrics units, unlike the result of michael@0: * @FT_Get_Kerning. michael@0: * michael@0: * @input: michael@0: * face :: A handle to the input face. michael@0: * michael@0: * left :: Index of the left glyph. michael@0: * michael@0: * right :: Index of the right glyph. michael@0: * michael@0: * @output: michael@0: * avector :: A kerning vector. michael@0: * michael@0: * @return: michael@0: * FreeType error code. 0~means success. michael@0: * michael@0: * @note: michael@0: * This function always return distances in original PFR metrics michael@0: * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED michael@0: * mode, which always returns distances converted to outline units. michael@0: * michael@0: * You can use the value of the `x_scale' and `y_scale' parameters michael@0: * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. michael@0: */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Get_PFR_Kerning( FT_Face face, michael@0: FT_UInt left, michael@0: FT_UInt right, michael@0: FT_Vector *avector ); michael@0: michael@0: michael@0: /********************************************************************** michael@0: * michael@0: * @function: michael@0: * FT_Get_PFR_Advance michael@0: * michael@0: * @description: michael@0: * Return a given glyph advance, expressed in original metrics units, michael@0: * from a PFR font. michael@0: * michael@0: * @input: michael@0: * face :: A handle to the input face. michael@0: * michael@0: * gindex :: The glyph index. michael@0: * michael@0: * @output: michael@0: * aadvance :: The glyph advance in metrics units. michael@0: * michael@0: * @return: michael@0: * FreeType error code. 0~means success. michael@0: * michael@0: * @note: michael@0: * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics michael@0: * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). michael@0: */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Get_PFR_Advance( FT_Face face, michael@0: FT_UInt gindex, michael@0: FT_Pos *aadvance ); michael@0: michael@0: /* */ michael@0: michael@0: michael@0: FT_END_HEADER michael@0: michael@0: #endif /* __FTPFR_H__ */ michael@0: michael@0: michael@0: /* END */