michael@0: /***************************************************************************/ michael@0: /* */ michael@0: /* ftwinfnt.h */ michael@0: /* */ michael@0: /* FreeType API for accessing Windows fnt-specific data. */ michael@0: /* */ michael@0: /* Copyright 2003, 2004, 2008 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 __FTWINFNT_H__ michael@0: #define __FTWINFNT_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: /* winfnt_fonts */ michael@0: /* */ michael@0: /* */ michael@0: /* Window FNT Files */ michael@0: /* */ michael@0: /* <Abstract> */ michael@0: /* Windows FNT specific API. */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* This section contains the declaration of Windows FNT specific */ michael@0: /* functions. */ michael@0: /* */ michael@0: /*************************************************************************/ michael@0: michael@0: michael@0: /************************************************************************* michael@0: * michael@0: * @enum: michael@0: * FT_WinFNT_ID_XXX michael@0: * michael@0: * @description: michael@0: * A list of valid values for the `charset' byte in michael@0: * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX michael@0: * encodings (except for cp1361) can be found at michael@0: * ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS michael@0: * subdirectory. cp1361 is roughly a superset of michael@0: * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. michael@0: * michael@0: * @values: michael@0: * FT_WinFNT_ID_DEFAULT :: michael@0: * This is used for font enumeration and font creation as a michael@0: * `don't care' value. Valid font files don't contain this value. michael@0: * When querying for information about the character set of the font michael@0: * that is currently selected into a specified device context, this michael@0: * return value (of the related Windows API) simply denotes failure. michael@0: * michael@0: * FT_WinFNT_ID_SYMBOL :: michael@0: * There is no known mapping table available. michael@0: * michael@0: * FT_WinFNT_ID_MAC :: michael@0: * Mac Roman encoding. michael@0: * michael@0: * FT_WinFNT_ID_OEM :: michael@0: * From Michael Pöttgen <michael@poettgen.de>: michael@0: * michael@0: * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM michael@0: * is used for the charset of vector fonts, like `modern.fon', michael@0: * `roman.fon', and `script.fon' on Windows. michael@0: * michael@0: * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value michael@0: * specifies a character set that is operating-system dependent. michael@0: * michael@0: * The `IFIMETRICS' documentation from the `Windows Driver michael@0: * Development Kit' says: This font supports an OEM-specific michael@0: * character set. The OEM character set is system dependent. michael@0: * michael@0: * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the michael@0: * second default codepage that most international versions of michael@0: * Windows have. It is one of the OEM codepages from michael@0: * michael@0: * http://www.microsoft.com/globaldev/reference/cphome.mspx, michael@0: * michael@0: * and is used for the `DOS boxes', to support legacy applications. michael@0: * A German Windows version for example usually uses ANSI codepage michael@0: * 1252 and OEM codepage 850. michael@0: * michael@0: * FT_WinFNT_ID_CP874 :: michael@0: * A superset of Thai TIS 620 and ISO 8859-11. michael@0: * michael@0: * FT_WinFNT_ID_CP932 :: michael@0: * A superset of Japanese Shift-JIS (with minor deviations). michael@0: * michael@0: * FT_WinFNT_ID_CP936 :: michael@0: * A superset of simplified Chinese GB 2312-1980 (with different michael@0: * ordering and minor deviations). michael@0: * michael@0: * FT_WinFNT_ID_CP949 :: michael@0: * A superset of Korean Hangul KS~C 5601-1987 (with different michael@0: * ordering and minor deviations). michael@0: * michael@0: * FT_WinFNT_ID_CP950 :: michael@0: * A superset of traditional Chinese Big~5 ETen (with different michael@0: * ordering and minor deviations). michael@0: * michael@0: * FT_WinFNT_ID_CP1250 :: michael@0: * A superset of East European ISO 8859-2 (with slightly different michael@0: * ordering). michael@0: * michael@0: * FT_WinFNT_ID_CP1251 :: michael@0: * A superset of Russian ISO 8859-5 (with different ordering). michael@0: * michael@0: * FT_WinFNT_ID_CP1252 :: michael@0: * ANSI encoding. A superset of ISO 8859-1. michael@0: * michael@0: * FT_WinFNT_ID_CP1253 :: michael@0: * A superset of Greek ISO 8859-7 (with minor modifications). michael@0: * michael@0: * FT_WinFNT_ID_CP1254 :: michael@0: * A superset of Turkish ISO 8859-9. michael@0: * michael@0: * FT_WinFNT_ID_CP1255 :: michael@0: * A superset of Hebrew ISO 8859-8 (with some modifications). michael@0: * michael@0: * FT_WinFNT_ID_CP1256 :: michael@0: * A superset of Arabic ISO 8859-6 (with different ordering). michael@0: * michael@0: * FT_WinFNT_ID_CP1257 :: michael@0: * A superset of Baltic ISO 8859-13 (with some deviations). michael@0: * michael@0: * FT_WinFNT_ID_CP1258 :: michael@0: * For Vietnamese. This encoding doesn't cover all necessary michael@0: * characters. michael@0: * michael@0: * FT_WinFNT_ID_CP1361 :: michael@0: * Korean (Johab). michael@0: */ michael@0: michael@0: #define FT_WinFNT_ID_CP1252 0 michael@0: #define FT_WinFNT_ID_DEFAULT 1 michael@0: #define FT_WinFNT_ID_SYMBOL 2 michael@0: #define FT_WinFNT_ID_MAC 77 michael@0: #define FT_WinFNT_ID_CP932 128 michael@0: #define FT_WinFNT_ID_CP949 129 michael@0: #define FT_WinFNT_ID_CP1361 130 michael@0: #define FT_WinFNT_ID_CP936 134 michael@0: #define FT_WinFNT_ID_CP950 136 michael@0: #define FT_WinFNT_ID_CP1253 161 michael@0: #define FT_WinFNT_ID_CP1254 162 michael@0: #define FT_WinFNT_ID_CP1258 163 michael@0: #define FT_WinFNT_ID_CP1255 177 michael@0: #define FT_WinFNT_ID_CP1256 178 michael@0: #define FT_WinFNT_ID_CP1257 186 michael@0: #define FT_WinFNT_ID_CP1251 204 michael@0: #define FT_WinFNT_ID_CP874 222 michael@0: #define FT_WinFNT_ID_CP1250 238 michael@0: #define FT_WinFNT_ID_OEM 255 michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Struct> */ michael@0: /* FT_WinFNT_HeaderRec */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* Windows FNT Header info. */ michael@0: /* */ michael@0: typedef struct FT_WinFNT_HeaderRec_ michael@0: { michael@0: FT_UShort version; michael@0: FT_ULong file_size; michael@0: FT_Byte copyright[60]; michael@0: FT_UShort file_type; michael@0: FT_UShort nominal_point_size; michael@0: FT_UShort vertical_resolution; michael@0: FT_UShort horizontal_resolution; michael@0: FT_UShort ascent; michael@0: FT_UShort internal_leading; michael@0: FT_UShort external_leading; michael@0: FT_Byte italic; michael@0: FT_Byte underline; michael@0: FT_Byte strike_out; michael@0: FT_UShort weight; michael@0: FT_Byte charset; michael@0: FT_UShort pixel_width; michael@0: FT_UShort pixel_height; michael@0: FT_Byte pitch_and_family; michael@0: FT_UShort avg_width; michael@0: FT_UShort max_width; michael@0: FT_Byte first_char; michael@0: FT_Byte last_char; michael@0: FT_Byte default_char; michael@0: FT_Byte break_char; michael@0: FT_UShort bytes_per_row; michael@0: FT_ULong device_offset; michael@0: FT_ULong face_name_offset; michael@0: FT_ULong bits_pointer; michael@0: FT_ULong bits_offset; michael@0: FT_Byte reserved; michael@0: FT_ULong flags; michael@0: FT_UShort A_space; michael@0: FT_UShort B_space; michael@0: FT_UShort C_space; michael@0: FT_UShort color_table_offset; michael@0: FT_ULong reserved1[4]; michael@0: michael@0: } FT_WinFNT_HeaderRec; michael@0: michael@0: michael@0: /*************************************************************************/ michael@0: /* */ michael@0: /* <Struct> */ michael@0: /* FT_WinFNT_Header */ michael@0: /* */ michael@0: /* <Description> */ michael@0: /* A handle to an @FT_WinFNT_HeaderRec structure. */ michael@0: /* */ michael@0: typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; michael@0: michael@0: michael@0: /********************************************************************** michael@0: * michael@0: * @function: michael@0: * FT_Get_WinFNT_Header michael@0: * michael@0: * @description: michael@0: * Retrieve a Windows FNT font info header. michael@0: * michael@0: * @input: michael@0: * face :: A handle to the input face. michael@0: * michael@0: * @output: michael@0: * aheader :: The WinFNT header. michael@0: * michael@0: * @return: michael@0: * FreeType error code. 0~means success. michael@0: * michael@0: * @note: michael@0: * This function only works with Windows FNT faces, returning an error michael@0: * otherwise. michael@0: */ michael@0: FT_EXPORT( FT_Error ) michael@0: FT_Get_WinFNT_Header( FT_Face face, michael@0: FT_WinFNT_HeaderRec *aheader ); michael@0: michael@0: michael@0: /* */ michael@0: michael@0: FT_END_HEADER michael@0: michael@0: #endif /* __FTWINFNT_H__ */ michael@0: michael@0: michael@0: /* END */ michael@0: michael@0: michael@0: /* Local Variables: */ michael@0: /* coding: utf-8 */ michael@0: /* End: */