Created
November 1, 2013 18:10
-
-
Save trustin/7269400 to your computer and use it in GitHub Desktop.
Wine patch for saner font hinting configuration, which applies 'hintslight' for ASCII glyphs and 'hintnone' for others such as CJK glyphs. I hope Wine uses fontconfig to respect the hintstyle, lcdfilter, and rgba properties like other GTK apps do.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urN wine-orig/dlls/gdi32/freetype.c wine-patched/dlls/gdi32/freetype.c | |
--- wine-orig/dlls/gdi32/freetype.c 2013-07-19 02:57:36.000000000 +0900 | |
+++ wine-patched/dlls/gdi32/freetype.c 2013-11-01 11:05:11.998232947 +0900 | |
@@ -6199,10 +6199,15 @@ | |
} | |
if(format & GGO_UNHINTED) { | |
- load_flags |= FT_LOAD_NO_HINTING; | |
format &= ~GGO_UNHINTED; | |
} | |
+ if ((format & GGO_GLYPH_INDEX) || original_index > 255) { | |
+ load_flags |= FT_LOAD_NO_HINTING; | |
+ } else { | |
+ load_flags |= FT_LOAD_TARGET_LIGHT; | |
+ } | |
+ | |
if(original_index >= font->gmsize * GM_BLOCK_SIZE) { | |
font->gmsize = (original_index / GM_BLOCK_SIZE + 1); | |
font->gm = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, font->gm, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Screenshot which shows nicely rendered text: http://i.imgur.com/oYpsCHX.png