]>
Commit | Line | Data |
---|---|---|
e76d884b KK |
1 | --- fontconfig-2.3.95/src/fcfreetype.c.cmap-parsing 2006-04-25 11:31:41.000000000 -0400 |
2 | +++ fontconfig-2.3.95/src/fcfreetype.c 2006-05-18 08:14:09.000000000 -0400 | |
3 | @@ -2511,31 +2511,12 @@ | |
4 | } | |
5 | else | |
6 | { | |
7 | - FT_UInt gindex; | |
8 | - | |
9 | - /* | |
10 | - * Find the first encoded character in the font | |
11 | - */ | |
12 | - if (FT_Get_Char_Index (face, 0)) | |
13 | + page = ~0; | |
14 | + leaf = NULL; | |
15 | + ucs4 = FT_Get_First_Char (face, &glyph); | |
16 | + while (glyph != 0) | |
17 | { | |
18 | - ucs4 = 0; | |
19 | - gindex = 1; | |
20 | - } | |
21 | - else | |
22 | - { | |
23 | - ucs4 = FT_Get_Next_Char (face, 0, &gindex); | |
24 | - if (!ucs4) | |
25 | - gindex = 0; | |
26 | - } | |
27 | - | |
28 | - while (gindex) | |
29 | - { | |
30 | - page = ucs4 >> 8; | |
31 | - leaf = 0; | |
32 | - while ((ucs4 >> 8) == page) | |
33 | - { | |
34 | - glyph = FT_Get_Char_Index (face, ucs4); | |
35 | - if (glyph && FcFreeTypeCheckGlyph (face, ucs4, | |
36 | + if (FcFreeTypeCheckGlyph (face, ucs4, | |
37 | glyph, blanks, &advance)) | |
38 | { | |
39 | if (advance) | |
40 | @@ -2558,8 +2539,9 @@ | |
41 | } | |
42 | } | |
43 | ||
44 | - if (!leaf) | |
45 | + if ((ucs4 >> 8) != page) | |
46 | { | |
47 | + page = (ucs4 >> 8); | |
48 | leaf = FcCharSetFindLeafCreate (fcs, ucs4); | |
49 | if (!leaf) | |
50 | goto bail1; | |
51 | @@ -2571,11 +2553,7 @@ | |
52 | font_max = ucs4; | |
53 | #endif | |
54 | } | |
55 | - ucs4++; | |
56 | - } | |
57 | - ucs4 = FT_Get_Next_Char (face, ucs4 - 1, &gindex); | |
58 | - if (!ucs4) | |
59 | - gindex = 0; | |
60 | + ucs4 = FT_Get_Next_Char (face, ucs4, &glyph); | |
61 | } | |
62 | #ifdef CHECK | |
63 | for (ucs4 = 0; ucs4 < 0x10000; ucs4++) |