xorg-x11-libs/p_xft_cjk.diff

33 lines
762 B
Diff

--- src/xftfreetype.c
+++ src/xftfreetype.c
@@ -387,6 +387,7 @@
FcChar32 hash, *hashp;
FT_Face face;
int nhash;
+ FcBool bitmap;
if (!info)
return FcFalse;
@@ -509,8 +510,22 @@
*/
fi->load_flags = FT_LOAD_DEFAULT;
+#ifndef XFT_EMBEDDED_BITMAP
+#define XFT_EMBEDDED_BITMAP "embeddedbitmap"
+#endif
+
+ switch (FcPatternGetBool (pattern, XFT_EMBEDDED_BITMAP, 0, &bitmap)) {
+ case FcResultNoMatch:
+ bitmap = FcFalse;
+ break;
+ case FcResultMatch:
+ break;
+ default:
+ goto bail1;
+ }
+
/* disable bitmaps when anti-aliasing or transforming glyphs */
- if (fi->antialias || fi->transform)
+ if ((!bitmap && fi->antialias) || fi->transform)
fi->load_flags |= FT_LOAD_NO_BITMAP;