summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/pango/files/pango-1.1.0-slighthint.patch')
-rw-r--r--x11-libs/pango/files/pango-1.1.0-slighthint.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/x11-libs/pango/files/pango-1.1.0-slighthint.patch b/x11-libs/pango/files/pango-1.1.0-slighthint.patch
new file mode 100644
index 000000000000..4cbcb454997c
--- /dev/null
+++ b/x11-libs/pango/files/pango-1.1.0-slighthint.patch
@@ -0,0 +1,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;
+ }
+