Annotation of /trunk/xorg-old/patches-6.9.0-r1/1030_all_XFree86-4.2.99.3-embeddedbitmap-v2.patch
Parent Directory | Revision Log
Revision 167 -
(hide annotations)
(download)
Tue May 8 20:58:51 2007 UTC (17 years, 4 months ago) by niro
File size: 1632 byte(s)
Tue May 8 20:58:51 2007 UTC (17 years, 4 months ago) by niro
File size: 1632 byte(s)
-import
1 | niro | 167 | diff -urN xc.orig/lib/Xft/xftfreetype.c xc/lib/Xft/xftfreetype.c |
2 | --- xc.orig/lib/Xft/xftfreetype.c 2004-03-11 18:07:26.000000000 -0500 | ||
3 | +++ xc/lib/Xft/xftfreetype.c 2004-03-13 22:45:40.000000000 -0500 | ||
4 | @@ -372,7 +372,7 @@ | ||
5 | double dsize; | ||
6 | double aspect; | ||
7 | FcMatrix *font_matrix; | ||
8 | - FcBool hinting, vertical_layout, autohint, global_advance; | ||
9 | + FcBool hinting, vertical_layout, autohint, global_advance, prefer_bitmaps; | ||
10 | #ifdef FC_HINT_STYLE | ||
11 | int hint_style; | ||
12 | #endif | ||
13 | @@ -496,15 +496,30 @@ | ||
14 | else | ||
15 | fi->render = FcFalse; | ||
16 | |||
17 | + switch (FcPatternGetBool (pattern, "rh_prefer_bitmaps", 0, &prefer_bitmaps)) { | ||
18 | + case FcResultNoMatch: | ||
19 | + prefer_bitmaps = True; | ||
20 | + break; | ||
21 | + case FcResultMatch: | ||
22 | + break; | ||
23 | + default: | ||
24 | + goto bail1; | ||
25 | + } | ||
26 | + | ||
27 | /* | ||
28 | * Compute glyph load flags | ||
29 | */ | ||
30 | fi->load_flags = FT_LOAD_DEFAULT; | ||
31 | - | ||
32 | - /* disable bitmaps when anti-aliasing or transforming glyphs */ | ||
33 | - if (fi->antialias || fi->transform) | ||
34 | - fi->load_flags |= FT_LOAD_NO_BITMAP; | ||
35 | |||
36 | + /* disable bitmaps when anti-aliasing or transforming glyphs */ | ||
37 | + /* Generally, we want to prefer bitmaps when we have them, | ||
38 | + * even when antialiasing, because they make Han characters | ||
39 | + * more legible. But for Japanese, we want to make the | ||
40 | + * opposite choice, so it's controlled through fonts.conf. | ||
41 | + */ | ||
42 | + if ((fi->antialias && !prefer_bitmaps) || fi->transform) | ||
43 | + fi->load_flags |= FT_LOAD_NO_BITMAP; | ||
44 | + | ||
45 | /* disable hinting if requested */ | ||
46 | switch (FcPatternGetBool (pattern, FC_HINTING, 0, &hinting)) { | ||
47 | case FcResultNoMatch: |