Yu Shao <[EMAIL PROTECTED]> writes:

> Hi Keith,
> 
> I tested Xft2 with some Chinese pcf fonts, like gb16fs.pcf.gz come
> with Xfree86 4.2, but seems Xft2 could only find the truetype fonts
> from directories listed in fonts.conf. How should we handle those
> non-truetype fonts?

I looked at this issue a bit and it appears that the problem is the
FC_ANTIALIAS parameter; bitmap fonts end up with FC_ANTIALIAS=FcFalse in
their pattern, but XftFontMatch/XftDefaultSubstitute add
FC_ANTIALIAS=FcTrue by default.

(The appended code snippet illustrates the lack of the match
if you have the LucidaTypewriter PCF fonts from XFree86 in a directory
in your fonts.conf)

I believe the correct solution is to simply remove the code in
fontconfig that adds FC_ANTIALIAS=FcFalse for non-scaleable fonts.

It seems to me that FC_ANTIALIAS should indicate the _desired_
antialiasing, not whether the font can actually be effectively
antialiased.

Regards,
                                        Owen

====
#include <fontconfig/fontconfig.h>
#include <stddef.h>

int
main (int argc, char **argv)
{
  FcConfig *config = FcInitLoadConfigAndFonts ();
  FcFontSet *system_set = FcConfigGetFonts (config, FcSetSystem);
  FcPattern *pattern;
  FcPattern *pattern_result;
  FcResult result;
  
  pattern = FcPatternBuild (NULL,
                            FC_FAMILY, FcTypeString, "LucidaTypewriter",
                            FC_STYLE, FcTypeString, "Bold",
                            FC_ANTIALIAS, FcTypeBool, 1,
                            NULL);
  FcConfigSubstitute (config, pattern, FcMatchPattern);

  pattern_result = FcFontSetMatch (config, &system_set, 1, pattern, &result);

  FcPatternPrint (pattern_result);

  return 0;
}
_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to