Magellan Linux

Contents of /trunk/pango/patches/pango-1.2.2-slighthint.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 1124 byte(s)
-import

1 diff -ur pango-1.2.2/pango/pangoft2.c pango-1.2.2.slighthint/pango/pangoft2.c
2 --- pango-1.2.2/pango/pangoft2.c 2003-05-30 00:34:36.000000000 +0200
3 +++ pango-1.2.2.slighthint/pango/pangoft2.c 2003-06-02 18:09:37.000000000 +0200
4 @@ -210,6 +210,7 @@
5 FcPattern *pattern;
6 FcChar8 *filename;
7 FcBool antialias, hinting, autohint;
8 + int hintstyle;
9 int id;
10
11 pattern = ft2font->font_pattern;
12 @@ -233,8 +234,21 @@
13 FC_HINTING, 0, &hinting) != FcResultMatch)
14 hinting = FcTrue;
15
16 - if (!hinting)
17 - ft2font->load_flags |= FT_LOAD_NO_HINTING;
18 + if (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hintstyle) != FcResultMatch)
19 + hintstyle = FC_HINT_FULL;
20 +
21 + if (!hinting || hintstyle == FC_HINT_NONE)
22 + ft2font->load_flags |= FT_LOAD_NO_HINTING;
23 +
24 + switch (hintstyle) {
25 + case FC_HINT_SLIGHT:
26 + case FC_HINT_MEDIUM:
27 + ft2font->load_flags |= FT_LOAD_TARGET_LIGHT;
28 + break;
29 + default:
30 + ft2font->load_flags |= FT_LOAD_TARGET_NORMAL;
31 + break;
32 + }
33
34 /* force autohinting if requested */
35 if (FcPatternGetBool (pattern,