vrshoot
diff libs/ft2static/freetype/internal/t1types.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/internal/t1types.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,270 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* t1types.h */ 1.7 +/* */ 1.8 +/* Basic Type1/Type2 type definitions and interface (specification */ 1.9 +/* only). */ 1.10 +/* */ 1.11 +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ 1.12 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.13 +/* */ 1.14 +/* This file is part of the FreeType project, and may only be used, */ 1.15 +/* modified, and distributed under the terms of the FreeType project */ 1.16 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.17 +/* this file you indicate that you have read the license and */ 1.18 +/* understand and accept it fully. */ 1.19 +/* */ 1.20 +/***************************************************************************/ 1.21 + 1.22 + 1.23 +#ifndef __T1TYPES_H__ 1.24 +#define __T1TYPES_H__ 1.25 + 1.26 + 1.27 +#include <ft2build.h> 1.28 +#include FT_TYPE1_TABLES_H 1.29 +#include FT_INTERNAL_POSTSCRIPT_HINTS_H 1.30 +#include FT_INTERNAL_SERVICE_H 1.31 +#include FT_SERVICE_POSTSCRIPT_CMAPS_H 1.32 + 1.33 + 1.34 +FT_BEGIN_HEADER 1.35 + 1.36 + 1.37 + /*************************************************************************/ 1.38 + /*************************************************************************/ 1.39 + /*************************************************************************/ 1.40 + /*** ***/ 1.41 + /*** ***/ 1.42 + /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/ 1.43 + /*** ***/ 1.44 + /*** ***/ 1.45 + /*************************************************************************/ 1.46 + /*************************************************************************/ 1.47 + /*************************************************************************/ 1.48 + 1.49 + 1.50 + /*************************************************************************/ 1.51 + /* */ 1.52 + /* <Struct> */ 1.53 + /* T1_EncodingRec */ 1.54 + /* */ 1.55 + /* <Description> */ 1.56 + /* A structure modeling a custom encoding. */ 1.57 + /* */ 1.58 + /* <Fields> */ 1.59 + /* num_chars :: The number of character codes in the encoding. */ 1.60 + /* Usually 256. */ 1.61 + /* */ 1.62 + /* code_first :: The lowest valid character code in the encoding. */ 1.63 + /* */ 1.64 + /* code_last :: The highest valid character code in the encoding */ 1.65 + /* + 1. When equal to code_first there are no valid */ 1.66 + /* character codes. */ 1.67 + /* */ 1.68 + /* char_index :: An array of corresponding glyph indices. */ 1.69 + /* */ 1.70 + /* char_name :: An array of corresponding glyph names. */ 1.71 + /* */ 1.72 + typedef struct T1_EncodingRecRec_ 1.73 + { 1.74 + FT_Int num_chars; 1.75 + FT_Int code_first; 1.76 + FT_Int code_last; 1.77 + 1.78 + FT_UShort* char_index; 1.79 + FT_String** char_name; 1.80 + 1.81 + } T1_EncodingRec, *T1_Encoding; 1.82 + 1.83 + 1.84 + typedef enum T1_EncodingType_ 1.85 + { 1.86 + T1_ENCODING_TYPE_NONE = 0, 1.87 + T1_ENCODING_TYPE_ARRAY, 1.88 + T1_ENCODING_TYPE_STANDARD, 1.89 + T1_ENCODING_TYPE_ISOLATIN1, 1.90 + T1_ENCODING_TYPE_EXPERT 1.91 + 1.92 + } T1_EncodingType; 1.93 + 1.94 + 1.95 + /* used to hold extra data of PS_FontInfoRec that 1.96 + * cannot be stored in the publicly defined structure. 1.97 + * 1.98 + * Note these can't be blended with multiple-masters. 1.99 + */ 1.100 + typedef struct PS_FontExtraRec_ 1.101 + { 1.102 + FT_UShort fs_type; 1.103 + 1.104 + } PS_FontExtraRec; 1.105 + 1.106 + 1.107 + typedef struct T1_FontRec_ 1.108 + { 1.109 + PS_FontInfoRec font_info; /* font info dictionary */ 1.110 + PS_FontExtraRec font_extra; /* font info extra fields */ 1.111 + PS_PrivateRec private_dict; /* private dictionary */ 1.112 + FT_String* font_name; /* top-level dictionary */ 1.113 + 1.114 + T1_EncodingType encoding_type; 1.115 + T1_EncodingRec encoding; 1.116 + 1.117 + FT_Byte* subrs_block; 1.118 + FT_Byte* charstrings_block; 1.119 + FT_Byte* glyph_names_block; 1.120 + 1.121 + FT_Int num_subrs; 1.122 + FT_Byte** subrs; 1.123 + FT_PtrDist* subrs_len; 1.124 + 1.125 + FT_Int num_glyphs; 1.126 + FT_String** glyph_names; /* array of glyph names */ 1.127 + FT_Byte** charstrings; /* array of glyph charstrings */ 1.128 + FT_PtrDist* charstrings_len; 1.129 + 1.130 + FT_Byte paint_type; 1.131 + FT_Byte font_type; 1.132 + FT_Matrix font_matrix; 1.133 + FT_Vector font_offset; 1.134 + FT_BBox font_bbox; 1.135 + FT_Long font_id; 1.136 + 1.137 + FT_Fixed stroke_width; 1.138 + 1.139 + } T1_FontRec, *T1_Font; 1.140 + 1.141 + 1.142 + typedef struct CID_SubrsRec_ 1.143 + { 1.144 + FT_UInt num_subrs; 1.145 + FT_Byte** code; 1.146 + 1.147 + } CID_SubrsRec, *CID_Subrs; 1.148 + 1.149 + 1.150 + /*************************************************************************/ 1.151 + /*************************************************************************/ 1.152 + /*************************************************************************/ 1.153 + /*** ***/ 1.154 + /*** ***/ 1.155 + /*** AFM FONT INFORMATION STRUCTURES ***/ 1.156 + /*** ***/ 1.157 + /*** ***/ 1.158 + /*************************************************************************/ 1.159 + /*************************************************************************/ 1.160 + /*************************************************************************/ 1.161 + 1.162 + typedef struct AFM_TrackKernRec_ 1.163 + { 1.164 + FT_Int degree; 1.165 + FT_Fixed min_ptsize; 1.166 + FT_Fixed min_kern; 1.167 + FT_Fixed max_ptsize; 1.168 + FT_Fixed max_kern; 1.169 + 1.170 + } AFM_TrackKernRec, *AFM_TrackKern; 1.171 + 1.172 + typedef struct AFM_KernPairRec_ 1.173 + { 1.174 + FT_Int index1; 1.175 + FT_Int index2; 1.176 + FT_Int x; 1.177 + FT_Int y; 1.178 + 1.179 + } AFM_KernPairRec, *AFM_KernPair; 1.180 + 1.181 + typedef struct AFM_FontInfoRec_ 1.182 + { 1.183 + FT_Bool IsCIDFont; 1.184 + FT_BBox FontBBox; 1.185 + FT_Fixed Ascender; 1.186 + FT_Fixed Descender; 1.187 + AFM_TrackKern TrackKerns; /* free if non-NULL */ 1.188 + FT_Int NumTrackKern; 1.189 + AFM_KernPair KernPairs; /* free if non-NULL */ 1.190 + FT_Int NumKernPair; 1.191 + 1.192 + } AFM_FontInfoRec, *AFM_FontInfo; 1.193 + 1.194 + 1.195 + /*************************************************************************/ 1.196 + /*************************************************************************/ 1.197 + /*************************************************************************/ 1.198 + /*** ***/ 1.199 + /*** ***/ 1.200 + /*** ORIGINAL T1_FACE CLASS DEFINITION ***/ 1.201 + /*** ***/ 1.202 + /*** ***/ 1.203 + /*************************************************************************/ 1.204 + /*************************************************************************/ 1.205 + /*************************************************************************/ 1.206 + 1.207 + 1.208 + typedef struct T1_FaceRec_* T1_Face; 1.209 + typedef struct CID_FaceRec_* CID_Face; 1.210 + 1.211 + 1.212 + typedef struct T1_FaceRec_ 1.213 + { 1.214 + FT_FaceRec root; 1.215 + T1_FontRec type1; 1.216 + const void* psnames; 1.217 + const void* psaux; 1.218 + const void* afm_data; 1.219 + FT_CharMapRec charmaprecs[2]; 1.220 + FT_CharMap charmaps[2]; 1.221 + 1.222 +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS 1.223 + PS_Unicodes unicode_map; 1.224 +#endif 1.225 + 1.226 + /* support for Multiple Masters fonts */ 1.227 + PS_Blend blend; 1.228 + 1.229 + /* undocumented, optional: indices of subroutines that express */ 1.230 + /* the NormalizeDesignVector and the ConvertDesignVector procedure, */ 1.231 + /* respectively, as Type 2 charstrings; -1 if keywords not present */ 1.232 + FT_Int ndv_idx; 1.233 + FT_Int cdv_idx; 1.234 + 1.235 + /* undocumented, optional: has the same meaning as len_buildchar */ 1.236 + /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */ 1.237 + FT_UInt len_buildchar; 1.238 + FT_Long* buildchar; 1.239 + 1.240 + /* since version 2.1 - interface to PostScript hinter */ 1.241 + const void* pshinter; 1.242 + 1.243 + } T1_FaceRec; 1.244 + 1.245 + 1.246 + typedef struct CID_FaceRec_ 1.247 + { 1.248 + FT_FaceRec root; 1.249 + void* psnames; 1.250 + void* psaux; 1.251 + CID_FaceInfoRec cid; 1.252 + PS_FontExtraRec font_extra; 1.253 +#if 0 1.254 + void* afm_data; 1.255 +#endif 1.256 + CID_Subrs subrs; 1.257 + 1.258 + /* since version 2.1 - interface to PostScript hinter */ 1.259 + void* pshinter; 1.260 + 1.261 + /* since version 2.1.8, but was originally positioned after `afm_data' */ 1.262 + FT_Byte* binary_data; /* used if hex data has been converted */ 1.263 + FT_Stream cid_stream; 1.264 + 1.265 + } CID_FaceRec; 1.266 + 1.267 + 1.268 +FT_END_HEADER 1.269 + 1.270 +#endif /* __T1TYPES_H__ */ 1.271 + 1.272 + 1.273 +/* END */