blob: 337ecb08c7311211f3026f48d583cdfa4f9200f9 (
plain)
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
|
--- pango/pangoft2.c.orig 2005-12-09 23:37:11.000000000 -0600
+++ pango/pangoft2.c 2005-12-09 23:40:17.000000000 -0600
@@ -171,6 +171,7 @@
FcPattern *pattern;
FcChar8 *filename;
FcBool antialias, hinting, autohint;
+ int hintstyle;
int id;
pattern = fcfont->font_pattern;
@@ -194,8 +195,21 @@
FC_HINTING, 0, &hinting) != FcResultMatch)
hinting = FcTrue;
- if (!hinting)
- ft2font->load_flags |= FT_LOAD_NO_HINTING;
+ if (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hintstyle) != FcResultMatch)
+ hintstyle = FC_HINT_FULL;
+
+ if (!hinting || hintstyle == FC_HINT_NONE)
+ ft2font->load_flags |= FT_LOAD_NO_HINTING;
+
+ switch (hintstyle) {
+ case FC_HINT_SLIGHT:
+ case FC_HINT_MEDIUM:
+ ft2font->load_flags |= FT_LOAD_TARGET_LIGHT;
+ break;
+ default:
+ ft2font->load_flags |= FT_LOAD_TARGET_NORMAL;
+ break;
+ }
/* force autohinting if requested */
if (FcPatternGetBool (pattern,
|