Bug 57114 - regression on FcFontMatch with namelang
Summary: regression on FcFontMatch with namelang
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: Akira TAGOH
QA Contact: Behdad Esfahbod
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 10:13 UTC by Akira TAGOH
Modified: 2012-11-15 07:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Akira TAGOH 2012-11-14 10:13:32 UTC
After the fix of Bug27765, we have a ability to see the string with the certain language if any though, it makes harder to write the consistent rules with matching family, style and fullname.

Currently it take effects only when the above of objects are specified in the pattern though, one needs to write possibly all of pattern matching on the above objects because the result only contains strings what namelang expects. i.e.

  fc-match sans:namelang=ja

will returns the family name in Japanese if any, but style and fullname is still in English. so if a rule contains:

  <match target="font">
    <test name="family">
      <string>Gothic</string>
    </test>
    ...
  </match>

it may not be evaluated due to fail on matching with Gothic, but possibly ゴシック in the font pattern.

Proposed solution for this issue is, always to add a string in English with weak binding. that should helps.
Comment 1 Akira TAGOH 2012-11-15 07:39:40 UTC
Fixed in git c20ac78b01df3f0919352bba16b5b48b3b5d4d6d

Author: Akira TAGOH <akira@tagoh.org>
Date:   Thu Nov 15 16:37:01 2012 +0900

    Bug 57114 - regression on FcFontMatch with namelang
    
    After 7587d1c99d9476b6dd4dbe523c0204da700fed8d applied, family,
    style, and fullname is localized against current locale or lang
    if any though, the string in other languages were dropped from
    the pattern. this caused unexpected mismatch on the target="font"
    rules.
    
    This fix adds other strings at the end of the list.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.