tfontsrv: allow x11 hinting and disable autohint only (#254) - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit cc48e73a96c863784fb0bc46e69bccf509890827
 (DIR) parent 185fd7db0513a14c91749bfab3fe7dc30a64f480
 (HTM) Author: Xiao-Yong <xjin@anl.gov>
       Date:   Mon, 13 Jan 2020 10:02:13 -0600
       
       fontsrv: allow x11 hinting and disable autohint only (#254)
       
       Some truetype fonts have good manual hinting.
       Ignoring hinting makes the font render badly on low resolution screens.
       This commit only disables the freetype autohinter, and allows hinting.
       Diffstat:
         M src/cmd/fontsrv/x11.c               |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/cmd/fontsrv/x11.c b/src/cmd/fontsrv/x11.c
       t@@ -176,7 +176,7 @@ mksubfont(XFont *xf, char *name, int lo, int hi, int size, int antialias)
                        e = 1;
                        k = FT_Get_Char_Index(face, i);
                        if(k != 0) {
       -                        e = FT_Load_Glyph(face, k, FT_LOAD_RENDER|FT_LOAD_NO_HINTING|(antialias ? 0:FT_LOAD_TARGET_MONO));
       +                        e = FT_Load_Glyph(face, k, FT_LOAD_RENDER|FT_LOAD_NO_AUTOHINT|(antialias ? 0:FT_LOAD_TARGET_MONO));
                        }
                        if(e || face->glyph->advance.x <= 0) {
                                fc->width = 0;