1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
|
/************************************************************************/
/* */
/* Data that describes where a font belongs in the mess of font */
/* encodings and character sets that we have to cope with. */
/* */
/************************************************************************/
# ifndef UTIL_FONT_ENCODING_H
# define UTIL_FONT_ENCODING_H
/************************************************************************/
/* */
/* Document character sets that are more or less actively supported */
/* */
/************************************************************************/
# define DOCcharsetANSI 0
# define DOCcharsetMAC 1
# define DOCcharsetPC 2
# define DOCcharsetPCA 3
/************************************************************************/
/* */
/* Font encodings that we more or less actively support. */
/* */
/************************************************************************/
# define ENCODINGpsFONTSPECIFIC -1
# define ENCODINGpsISO_8859_1 0
# define ENCODINGpsISO_8859_2 1
# define ENCODINGpsADOBE_SYMBOL 2
# define ENCODINGpsADOBE_CYRILLIC 3
# define ENCODINGpsADOBE_DINGBATS 4
# define ENCODINGpsISO_8859_7 5
# define ENCODINGpsISO_8859_9 6
# define ENCODINGpsISO_8859_13 7
# define ENCODINGps_COUNT 8
typedef struct FontCharset
{
const char * const * fcGlyphNames;
int fcGlyphCount;
const char * fcEncodingSuffix;
const char * fcEncodingArrayName;
char * fcId;
char * fcLabel;
int fcOfficeCharset;
int fcOfficeCodepage;
const char * fcOfficeFontnameSuffix;
const char * fcX11Registry;
const char * fcX11Encoding;
unsigned char fcCharKinds[256];
unsigned char fcCharShifts[256];
} FontCharset;
/************************************************************************/
/* */
/* Font character sets as used by windows programs. */
/* */
/************************************************************************/
# define FONTcharsetANSI 0 /* cpg 1252 */
# define FONTcharsetDEFAULT 1 /* i.e. font specific */
# define FONTcharsetSYMBOL 2
# define FONTcharsetINVALID 3
# define FONTcharsetMAC 77
# define FONTcharsetSHIFTJIS 128 /* cpg 932 */
# define FONTcharsetHANGEUL 129 /* cpg 949 */
# define FONTcharsetJOHAB 130 /* cpg 1361 */
# define FONTcharsetGB2313 134 /* cpg 936 */
# define FONTcharsetCHINESEBIG5 136 /* cpg 950 */
# define FONTcharsetGREEK 161 /* cpg 1253 */
# define FONTcharsetTURKISH 162 /* cpg 1254 */
# define FONTcharsetVIETNAMESE 163 /* cpg 1258 */
# define FONTcharsetBALTIC 186 /* cpg 1257 */
# define FONTcharsetHEBREW 177 /* cpg 1255 */
# define FONTcharsetARABIC 178 /* cpg 1256 */
# define FONTcharsetARABIC_TRADITION 179
# define FONTcharsetARABIC_USER 180
# define FONTcharsetHEBREW_USER 181
# define FONTcharsetRUSSIAN 204 /* cpg 1251 */
# define FONTcharsetTHAI 222 /* cpg 874 */
# define FONTcharsetEE 238 /* cpg 1250 */
# define FONTcharsetPC_437 254 /* cpg 437 */
# define FONTcharsetOEM 255
# define FONTcharsetMAC_X 256 /* ? */
/************************************************************************/
/* */
/* Font codepages sets as used by windows programs. */
/* */
/************************************************************************/
# define FONTcodepagePC_437 437
# define FONTcodepageTHAI 874
# define FONTcodepageSHIFTJIS 932
# define FONTcodepageGB2313 936
# define FONTcodepageHANGEUL 949
# define FONTcodepageCHINESEBIG5 950
# define FONTcodepageEE 1250
# define FONTcodepageRUSSIAN 1251
# define FONTcodepageANSI 1252
# define FONTcodepageGREEK 1253
# define FONTcodepageTURKISH 1254
# define FONTcodepageHEBREW 1255
# define FONTcodepageARABIC 1256
# define FONTcodepageBALTIC 1257
# define FONTcodepageVIETNAMESE 1258
# define FONTcodepageJOHAB 1361
# define FONTcodepageMAC_X 10000
/************************************************************************/
/* */
/* Declarations. */
/* */
/************************************************************************/
extern FontCharset PS_Encodings[ENCODINGps_COUNT];
extern const char * const psIsoLatin1GlyphNames[256];
extern const char * const psIsoLatin2GlyphNames[256];
extern const char * const psIsoLatin5GlyphNames[256];
extern const char * const psIsoLatin7GlyphNames[256];
extern const char * const psIsoLatin9GlyphNames[256];
extern const char * const psIsoLatin10GlyphNames[256];
extern const char * const psIsoLatin13GlyphNames[256];
extern const char * const psIsoLatin15GlyphNames[256];
extern const char * const psSymbolGlyphNames[256];
extern const char * const psCyrillicGlyphNames[256];
extern const char * const psDingbatGlyphNames[256];
extern const char * const psAppleTtfGlyphNames[258]; /* 258 ! */
extern const unsigned char docWIN1250_to_ISO2[256];
extern const unsigned char docISO2_to_WIN1250[256];
extern const unsigned char docWIN1253_to_ISO7[256];
extern const unsigned char docISO7_to_WIN1253[256];
extern const unsigned char docWIN1254_to_ISO9[256];
extern const unsigned char docISO9_to_WIN1254[256];
extern const unsigned char docWIN1257_to_ISO13[256];
extern const unsigned char docISO13_to_WIN1257[256];
extern const unsigned char docWIN1251_to_KOI8R[256];
extern const unsigned char docKOI8R_to_WIN1251[256];
extern const unsigned char docWIN1251_to_ISO5[256];
extern const unsigned char docISO5_to_WIN1251[256];
extern const unsigned char docDOS437_to_ISO1[256];
extern const unsigned char docDOS850_to_ISO1[256];
extern const unsigned char docMAC_to_ISO1[256];
extern void utilSetEncodingCharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256],
int encoding );
extern void utilSetLatin1CharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetLatin2CharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetLatin5CharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetLatin7CharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetLatin9CharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetLatin13CharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetSymbolCharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilSetKoi8rCharacterKinds(
unsigned char charKinds[256],
unsigned char charShifts[256] );
extern void utilInitializeFontEncodings( void );
extern int utilWindowsCharsetFromCodepage( int codepage );
extern int utilEncodingFromWindowsCodepage( int codepage );
extern int utilWindowsCodepageFromEncoding( int encoding );
extern int utilEncodingFromX11FontName( const char * x11name );
extern const char * psUnicodeToGlyphName( int unicode );
# endif
|