1 diff -crN -x Makefile xc/lib/font/FreeType/ft.h xc.new/lib/font/FreeType/ft.h
2 *** xc/lib/font/FreeType/ft.h Sun Apr 25 18:32:21 1999
3 --- xc.new/lib/font/FreeType/ft.h Sun Oct 10 01:48:10 1999
11 struct font_encoding *encoding;
12 struct font_encoding_mapping *mapping;
18 int ttf_pick_cmap(char*, int, char*, TT_Face, struct ttf_mapping *);
19 int ftstrcasecmp(const char *s1, const char *s2);
20 + unsigned ttf_remap(unsigned code, struct ttf_mapping *tm);
26 int ttf_u2a(int, char*, char*, int);
27 int FTtoXReturnCode(int);
28 int ttf_GetEnglishName(TT_Face, char *, int);
33 int ttf_u2a(int, char*, char*, int);
34 int FTtoXReturnCode(int);
35 int ttf_GetEnglishName(TT_Face, char *, int);
36 ! int ttf_checkForTTCName(char*, char**, int*);
38 diff -crN -x Makefile xc/lib/font/FreeType/ftenc.c xc.new/lib/font/FreeType/ftenc.c
39 *** xc/lib/font/FreeType/ftenc.c Sun Apr 25 18:32:21 1999
40 --- xc.new/lib/font/FreeType/ftenc.c Sun Oct 10 02:51:55 1999
46 /* TrueType-dependent encoding code */
49 #include "fontmisc.h" /* defines xalloc and friends */
54 struct font_encoding *encoding;
55 struct font_encoding_mapping *mapping;
59 char *encoding_name=0;
65 if(!strcasecmp(encoding_name, "truetype-raw")) {
77 + if(!strcasecmp(encoding_name, "microsoft-symbol")) {
78 + /* deal with undocumented lossage */
79 + TT_Face_Properties properties;
80 + if(!TT_Get_Face_Properties(face, &properties) &&
82 + tm->base=properties.os2->usFirstCharIndex-0x20;
87 tm->encoding=encoding;
93 if(!find_cmap(FONT_ENCODING_UNICODE, 0, 0, face, &cmap)) {
103 if(!TT_Get_CharMap(face, 0, &cmap)) {
128 return TT_Char_Index(tm->cmap, index);
130 diff -crN -x Makefile xc/lib/font/FreeType/ftfuncs.c xc.new/lib/font/FreeType/ftfuncs.c
131 *** xc/lib/font/FreeType/ftfuncs.c Sun Jun 13 19:06:17 1999
132 --- xc.new/lib/font/FreeType/ftfuncs.c Sun Oct 10 01:49:04 1999
137 /* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.11 1999/06/13 13:47:29 dawes Exp $ */
139 + #include <string.h>
141 #include "fontmisc.h"
142 #include "fntfilst.h"
143 #include "fontutil.h"
149 ! if(ttc_checkForTTCName(fileName, &realFileName, &faceNumber)) {
150 ftrc=TT_Open_Collection(ftypeEngine, realFileName, faceNumber,
157 ! if(ttf_checkForTTCName(fileName, &realFileName, &faceNumber)) {
158 ftrc=TT_Open_Collection(ftypeEngine, realFileName, faceNumber,
164 FreeTypeFreeXFont(FontPtr pFont, int freeProps)
176 - unsigned long code;
177 char *sp, *ep, val[256];
178 TT_Instance_Metrics imetrics;
179 int upm; /* units per em */
183 FontEncoding charEncoding, unsigned long *glyphCount,
184 CharInfoPtr *glyphs, int nlevels)
191 diff -crN -x Makefile xc/lib/font/FreeType/ftfuncs.h xc.new/lib/font/FreeType/ftfuncs.h
192 *** xc/lib/font/FreeType/ftfuncs.h Sun Apr 25 18:32:22 1999
193 --- xc.new/lib/font/FreeType/ftfuncs.h Sun Oct 10 01:45:15 1999
196 /* Glyphs are held in segments of this size */
197 #define FONTSEGMENTSIZE 16
199 - /* defined in atom.c */
200 - Atom MakeAtom(char *, unsigned, int);
202 /* A structure that holds bitmap order and padding info. */
206 diff -crN -x Makefile xc/lib/font/FreeType/ftutil.c xc.new/lib/font/FreeType/ftutil.c
207 *** xc/lib/font/FreeType/ftutil.c Sun Apr 25 18:32:22 1999
208 --- xc.new/lib/font/FreeType/ftutil.c Sun Oct 10 01:50:22 1999
212 ttf_GetEnglishName(TT_Face face, char *name, int nameID)
216 unsigned short nrPlatformID, nrEncodingID, nrLanguageID, nrNameID;
220 ttf_GetEnglishName(TT_Face face, char *name, int nameID)
224 unsigned short nrPlatformID, nrEncodingID, nrLanguageID, nrNameID;
228 nrLanguageID==0x0c09 || nrLanguageID==0x1009 ||
229 nrLanguageID==0x1409 || nrLanguageID==0x1809)) ||
230 /* or for Apple, Unicode, English */
231 ! ((nrPlatformID==0 && nrNameID==nameID &
233 if(!TT_Get_Name_String(face, i, &s, &slen))
234 return ttf_u2a(slen, s, name, MSBFirst);
236 nrLanguageID==0x0c09 || nrLanguageID==0x1009 ||
237 nrLanguageID==0x1409 || nrLanguageID==0x1809)) ||
238 /* or for Apple, Unicode, English */
239 ! ((nrPlatformID==0 && nrNameID==nameID &&
241 if(!TT_Get_Name_String(face, i, &s, &slen))
242 return ttf_u2a(slen, s, name, MSBFirst);
248 ! ttc_checkForTTCName(char *fileName, char **realFileName, int *faceNumber)
256 ! ttf_checkForTTCName(char *fileName, char **realFileName, int *faceNumber)
260 diff -crN -x Makefile xc/lib/font/fontfile/fontenc.c xc.new/lib/font/fontfile/fontenc.c
261 *** xc/lib/font/fontfile/fontenc.c Sun Oct 10 03:03:10 1999
262 --- xc.new/lib/font/fontfile/fontenc.c Sun Oct 10 02:24:00 1999
268 ! /* Apparently, Microsoft Symbol aims at being compatible with Unicode
269 ! * by using the 16 columns of the Private Use Area starting at code
273 ! eight_bit_to_microsoft_symbol(unsigned code, void *client_data)
275 ! return code+0xF000;
278 static struct font_encoding_mapping microsoft_symbol[]=
279 ! {{FONT_ENCODING_TRUETYPE,3,0,eight_bit_to_microsoft_symbol,0,0,0},
281 ! {FONT_ENCODING_TRUETYPE,3,1,eight_bit_to_microsoft_symbol,0,0,0},
284 static struct font_encoding_mapping apple_roman[]=
289 ! /* Microsoft Symbol is treated specially in ftenc.c, where we add
290 ! * usFirstCharIndex-0x20 to the glyph index before applying the
293 static struct font_encoding_mapping microsoft_symbol[]=
294 ! {{FONT_ENCODING_TRUETYPE,3,0,0,0,0,0},
296 ! {FONT_ENCODING_TRUETYPE,3,1,0,0,0,0},
299 static struct font_encoding_mapping apple_roman[]=