Comment 101 for bug 105900

Revision history for this message
In , Mfabian (mfabian) wrote :

As one can see in the output of the fontconfig test program,
we get the style names translated in Catalan, *although* the
test program explicitly requested them in English:

 pattern = FcPatternBuild (NULL,
      FC_FAMILY,
      FcTypeString,
      (unsigned char *) argv[1],
/* FC_STYLE, */
/* FcTypeString, */
/* "Italic", */
      FC_SLANT,
      FcTypeInteger,
      100,
      FC_STYLELANG,
      FcTypeString,
      "en", ← style requested in English
      NULL);

Requesting the style "Italic" (commented out above) or
the slant value of 100 works, it really limits the the
fontset created from this pattern with

    fontset = FcFontList (NULL, pattern, objectset);

to only the slanted versions.

But requesting a language for the style does *not* work. Requesting an
non-existing language for the style, e.g. "xx" or "de" (The styles of
Arial have no German translation) results in an empty result. But
requesting "en" or any other language where translations of the style
exist doesn’t limit the result to the requested language.

I guess it should, therefore this looks like a fontconfig bug to me.