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
35
36
37
38
39
40
41
42
43
44
45
46
|
--- pango-1.1.0/pango/pangoft2.c.slighthint Thu Aug 8 19:13:38 2002
+++ pango-1.1.0/pango/pangoft2.c Tue Aug 13 00:42:17 2002
@@ -205,6 +205,8 @@
FcPattern *pattern;
FcChar8 *filename;
FcBool hinting, autohint;
+ FT_ULong hint_flags;
+ int hintstyle;
int id;
pattern = ft2font->font_pattern;
@@ -220,8 +222,22 @@
if (FcPatternGetBool (pattern, 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:
+ hint_flags = FT_HINT_NO_INTEGER_STEM | FT_HINT_NO_VSTEM_ALIGN;
+ break;
+ case FC_HINT_MEDIUM:
+ hint_flags = FT_HINT_NO_INTEGER_STEM;
+ break;
+ default:
+ hint_flags = 0;
+ }
/* force autohinting if requested */
if (FcPatternGetBool (pattern, FC_AUTOHINT, 0, &autohint) != FcResultMatch)
@@ -243,6 +259,9 @@
bail0:
load_fallback_face (ft2font, filename);
}
+
+ FT_Set_Hint_Flags (ft2font->face, hint_flags);
+
ft2font->face->generic.data = 0;
}
|