[MPlayer-dev-eng] glyph loaded without hinting

Chia I Wu b90201047 at ntu.edu.tw
Fri May 13 19:36:07 CEST 2005


On Fri, May 13, 2005 at 01:11:18PM -0400, Rich Felker wrote:
> On Fri, May 13, 2005 at 06:39:14PM +0200, Diego Biurrun wrote:
> > On Fri, May 13, 2005 at 05:52:39PM +0800, Chia I Wu wrote:
> > > 
> > > Is there any reason to load glyph without hinting (in libvo/font_load_ft.c)?
> > > Some Chinese fonts need hinting (and bytecode intepreter being enabled
> > > in freetype) to be rendered correctly.
> > 
> > I would guess it is because the developers don't use Chinese fonts.
> > Patches welcome.
> 
> Disabling hinting is always broken, I expect. Just less noticable with
> western charsets. This should be fixed.
> 
> Rich
This patch just enables hinting.

You may want to see what it fixes:
http://www.olv.idv.tw/~olvaffe/tmp/mphinting-wrong.png
http://www.olv.idv.tw/~olvaffe/tmp/mphinting-right.png
-------------- next part --------------
Index: libvo/font_load_ft.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load_ft.c,v
retrieving revision 1.15
diff -u -r1.15 font_load_ft.c
--- libvo/font_load_ft.c	28 Oct 2004 01:15:52 -0000	1.15
+++ libvo/font_load_ft.c	13 May 2005 17:12:14 -0000
@@ -117,7 +117,7 @@
 		      int unicode) {
     FT_Error	error;
     FT_Face face = desc->faces[pic_idx];
-    int	const	load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+    int	const	load_flags = FT_LOAD_DEFAULT;
     int		ymin = INT_MAX, ymax = INT_MIN;
     int		space_advance = 20;
     int         width, height;
@@ -496,7 +496,7 @@
     int width, height, stride, maxw, off;
     unsigned char *abuffer, *bbuffer;
     
-    int	const	load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
+    int	const	load_flags = FT_LOAD_DEFAULT;
     int		pen_xa;
     int font = desc->font[c];
     int error;


More information about the MPlayer-dev-eng mailing list