Making family names returned by FcFreeTypeQueryFace locale aware?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We hit a locale sensitivity issue of font family name matching
in Qt. We use fontconfig like this:

* For system fonts, we query the list of fonts with FcFontList()
  and store the first family name of each result in a list,
  these family names are always locale aware because the results
  returned by FcFontList() are always locale aware.

* For application fonts, we construct a FTFace from the data and
  use FcFreeTypeQueryFace to get a FcPattern from it, then get
  the first family name in the pattern returned, store it in a
  list. However, the family names returned in this pattern are
  *NOT* locale aware.

The problem of above methods is the family names from the
application font list cannot be used to query a font in the
first family name list.

For instance, if I have the font "SimSun.ttc", my locale is
zh_CN.UTF-8, then the first list will have "åä" while the
application font list will have "SimSun".

Possible solutions will be make the family names in the pattern
returned by FcFreeTypeQueryFace locale aware, or at least let
us to get id of family name in locale aware manner, currently
all the locale related functions in fontconfig are private,
thus we cannot reproduce the entire locale matching process
without duplicate fontconfig code in Qt.

Any suggestions?

- Jiang
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux