To follow up my earlier email on getting non-antialiased TTF fonts to look
right with Xft...

 * The magic option to match the core X renderer's behavior was indeed
   enabling the TrueType bytecode interpreter when building Freetype.
   Thanks, Keith!

   I must say I'm surprised that XFree86 enables this option by default,
   given the associated patent issue.

 * I was able to upgrade to Freetype 2.1.3 without changing the display
   results.  However, 2.1.4rc1 displayed some rendering differences,
   which I suspect are bugs.  For example, the '@' character was almost
   completely filled in, as was the lower half of lower-case 'e'.
   So, no more Freetype prereleases for me for a while.

 * If the bytecode interpreter is not enabled, the rendering of monochrome
   TTF fonts can be substantially improved (though not enough for my taste)
   by applying the following patch to the Xft library:

--- xftglyphs.c 2003-02-17 02:56:09.000000000 -0600
+++ new-xftglyphs.c     2003-02-17 01:30:56.000000000 -0600
@@ -150,7 +150,10 @@
        if (xftg->glyph_memory)
            continue;

-       error = FT_Load_Glyph (face, glyphindex, font->info.load_flags);
+       /* JB - force monochrome bitmap loading if not antialiasing */
+       error = FT_Load_Glyph (face, glyphindex,
+                              font->info.antialias ? font->info.load_flags :
+                              (FT_LOAD_RENDER | FT_LOAD_MONOCHROME));
        if (error)
        {
            /*

The above was just a quick and incomplete hack, but it's worth considering
whether a similar patch should go into libXft for the 4.3 release (or
afterwards, if it is deemed insufficiently important).  It would
probably be more appropriate to set these flags in XftFontInfoFill()
in xftfreetype.c if fontconfig reports that a given font should not be
antialiased.

Anyhow, all is well here using the Sunday night CVS head of XFree86.

                                                         Jeremy
_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86

Reply via email to