[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: Making family names returned by FcFreeTypeQueryFace locale aware?



On Fri, Dec 17, 2010 at 1:06 PM, Jjgod Jiang <gzjjgod@xxxxxxxxx> wrote:
> 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?

Anyone have any opinion about this question?

If there is no objection, I can provide a patch for it, but I
just need to make sure the maintainer is willing to integrate
such a change.

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



[Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Legacy]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux