vrshoot
diff libs/ft2static/freetype/ftpfr.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/ft2static/freetype/ftpfr.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,172 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* ftpfr.h */ 1.7 +/* */ 1.8 +/* FreeType API for accessing PFR-specific data (specification only). */ 1.9 +/* */ 1.10 +/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ 1.11 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.12 +/* */ 1.13 +/* This file is part of the FreeType project, and may only be used, */ 1.14 +/* modified, and distributed under the terms of the FreeType project */ 1.15 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.16 +/* this file you indicate that you have read the license and */ 1.17 +/* understand and accept it fully. */ 1.18 +/* */ 1.19 +/***************************************************************************/ 1.20 + 1.21 + 1.22 +#ifndef __FTPFR_H__ 1.23 +#define __FTPFR_H__ 1.24 + 1.25 +#include <ft2build.h> 1.26 +#include FT_FREETYPE_H 1.27 + 1.28 +#ifdef FREETYPE_H 1.29 +#error "freetype.h of FreeType 1 has been loaded!" 1.30 +#error "Please fix the directory search order for header files" 1.31 +#error "so that freetype.h of FreeType 2 is found first." 1.32 +#endif 1.33 + 1.34 + 1.35 +FT_BEGIN_HEADER 1.36 + 1.37 + 1.38 + /*************************************************************************/ 1.39 + /* */ 1.40 + /* <Section> */ 1.41 + /* pfr_fonts */ 1.42 + /* */ 1.43 + /* <Title> */ 1.44 + /* PFR Fonts */ 1.45 + /* */ 1.46 + /* <Abstract> */ 1.47 + /* PFR/TrueDoc specific API. */ 1.48 + /* */ 1.49 + /* <Description> */ 1.50 + /* This section contains the declaration of PFR-specific functions. */ 1.51 + /* */ 1.52 + /*************************************************************************/ 1.53 + 1.54 + 1.55 + /********************************************************************** 1.56 + * 1.57 + * @function: 1.58 + * FT_Get_PFR_Metrics 1.59 + * 1.60 + * @description: 1.61 + * Return the outline and metrics resolutions of a given PFR face. 1.62 + * 1.63 + * @input: 1.64 + * face :: Handle to the input face. It can be a non-PFR face. 1.65 + * 1.66 + * @output: 1.67 + * aoutline_resolution :: 1.68 + * Outline resolution. This is equivalent to `face->units_per_EM' 1.69 + * for non-PFR fonts. Optional (parameter can be NULL). 1.70 + * 1.71 + * ametrics_resolution :: 1.72 + * Metrics resolution. This is equivalent to `outline_resolution' 1.73 + * for non-PFR fonts. Optional (parameter can be NULL). 1.74 + * 1.75 + * ametrics_x_scale :: 1.76 + * A 16.16 fixed-point number used to scale distance expressed 1.77 + * in metrics units to device sub-pixels. This is equivalent to 1.78 + * `face->size->x_scale', but for metrics only. Optional (parameter 1.79 + * can be NULL). 1.80 + * 1.81 + * ametrics_y_scale :: 1.82 + * Same as `ametrics_x_scale' but for the vertical direction. 1.83 + * optional (parameter can be NULL). 1.84 + * 1.85 + * @return: 1.86 + * FreeType error code. 0~means success. 1.87 + * 1.88 + * @note: 1.89 + * If the input face is not a PFR, this function will return an error. 1.90 + * However, in all cases, it will return valid values. 1.91 + */ 1.92 + FT_EXPORT( FT_Error ) 1.93 + FT_Get_PFR_Metrics( FT_Face face, 1.94 + FT_UInt *aoutline_resolution, 1.95 + FT_UInt *ametrics_resolution, 1.96 + FT_Fixed *ametrics_x_scale, 1.97 + FT_Fixed *ametrics_y_scale ); 1.98 + 1.99 + 1.100 + /********************************************************************** 1.101 + * 1.102 + * @function: 1.103 + * FT_Get_PFR_Kerning 1.104 + * 1.105 + * @description: 1.106 + * Return the kerning pair corresponding to two glyphs in a PFR face. 1.107 + * The distance is expressed in metrics units, unlike the result of 1.108 + * @FT_Get_Kerning. 1.109 + * 1.110 + * @input: 1.111 + * face :: A handle to the input face. 1.112 + * 1.113 + * left :: Index of the left glyph. 1.114 + * 1.115 + * right :: Index of the right glyph. 1.116 + * 1.117 + * @output: 1.118 + * avector :: A kerning vector. 1.119 + * 1.120 + * @return: 1.121 + * FreeType error code. 0~means success. 1.122 + * 1.123 + * @note: 1.124 + * This function always return distances in original PFR metrics 1.125 + * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED 1.126 + * mode, which always returns distances converted to outline units. 1.127 + * 1.128 + * You can use the value of the `x_scale' and `y_scale' parameters 1.129 + * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. 1.130 + */ 1.131 + FT_EXPORT( FT_Error ) 1.132 + FT_Get_PFR_Kerning( FT_Face face, 1.133 + FT_UInt left, 1.134 + FT_UInt right, 1.135 + FT_Vector *avector ); 1.136 + 1.137 + 1.138 + /********************************************************************** 1.139 + * 1.140 + * @function: 1.141 + * FT_Get_PFR_Advance 1.142 + * 1.143 + * @description: 1.144 + * Return a given glyph advance, expressed in original metrics units, 1.145 + * from a PFR font. 1.146 + * 1.147 + * @input: 1.148 + * face :: A handle to the input face. 1.149 + * 1.150 + * gindex :: The glyph index. 1.151 + * 1.152 + * @output: 1.153 + * aadvance :: The glyph advance in metrics units. 1.154 + * 1.155 + * @return: 1.156 + * FreeType error code. 0~means success. 1.157 + * 1.158 + * @note: 1.159 + * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics 1.160 + * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). 1.161 + */ 1.162 + FT_EXPORT( FT_Error ) 1.163 + FT_Get_PFR_Advance( FT_Face face, 1.164 + FT_UInt gindex, 1.165 + FT_Pos *aadvance ); 1.166 + 1.167 + /* */ 1.168 + 1.169 + 1.170 +FT_END_HEADER 1.171 + 1.172 +#endif /* __FTPFR_H__ */ 1.173 + 1.174 + 1.175 +/* END */