Bug 578039 - lang-specific overrides rule doesn't work as expected
lang-specific overrides rule doesn't work as expected
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lohit-tamil-fonts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Pravin Satpute
Fedora Extras Quality Assurance
:
Depends On: 578015
Blocks: F13Target 586867
  Show dependency treegraph
 
Reported: 2010-03-29 23:49 EDT by Akira TAGOH
Modified: 2010-08-05 00:25 EDT (History)
4 users (show)

See Also:
Fixed In Version: lohit-tamil-fonts-2.4.5-3.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 586867 (view as bug list)
Environment:
Last Closed: 2010-04-25 09:49:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Akira TAGOH 2010-03-29 23:49:14 EDT
Description of problem:
All of detailed information is available on my post at the fonts list:
http://lists.fedoraproject.org/pipermail/fonts/2010-March/001117.html

binding="same" in the fontconfig config file prevents to apply the rule for the
specific
language only properly. As a result, fonts is used for non-targetted languages
and it may gives different look and feel in some cases.

I'd propose to get rid of binding="same" from:
 66-lohit-tamil.conf
Comment 1 Fedora Update System 2010-04-19 05:03:39 EDT
lohit-tamil-fonts-2.4.5-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-3.fc13
Comment 2 Pravin Satpute 2010-04-19 05:10:23 EDT
fixed in lohit-tamil-fonts-2.4.5-3.fc14
Comment 3 Fedora Update System 2010-04-20 09:17:16 EDT
lohit-tamil-fonts-2.4.5-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lohit-tamil-fonts'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-3.fc13
Comment 4 Akira TAGOH 2010-04-22 07:35:35 EDT
Testing result:
# rpm -q lohit-tamil-fonts
lohit-tamil-fonts-2.4.5-3.fc13.noarch
# fc-match monospace:lang=en
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
# fc-match monospace:lang=en-us
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
# fc-match monospace:lang=ta
Lohit-Tamil.ttf: "Lohit Tamil" "Regular"
# fc-match monospace:lang=ta-in
Lohit-Tamil.ttf: "Lohit Tamil" "Regular"
# fc-match serif:lang=en
DejaVuSerif.ttf: "DejaVu Serif" "Book"
# fc-match serif:lang=en-us
DejaVuSerif.ttf: "DejaVu Serif" "Book"
# fc-match serif:lang=ta
Lohit-Tamil.ttf: "Lohit Tamil" "Regular"
# fc-match serif:lang=ta-in
Lohit-Tamil.ttf: "Lohit Tamil" "Regular"

No explicit rules for monospace nor serif in lohit-tamil-fonts.

# fc-match sans:lang=en
DejaVuSans.ttf: "DejaVu Sans" "Book"
# fc-match sans:lang=en-us
DejaVuSans.ttf: "DejaVu Sans" "Book"
# fc-match sans:lang=ta
Lohit-Tamil.ttf: "Lohit Tamil" "Regular"
# fc-match sans:lang=ta-in
Lohit-Tamil.ttf: "Lohit Tamil" "Regular"

that looks good.

# for i in $(ls /usr/share/locale|grep -v -E "^ta$"); do fc-match sans:lang=$i|grep "Lohit Tamil"; [ $? = 0 ] && echo $i; done
#

No affects to other languages. comfirmed the updated package works fine.
Comment 5 Fedora Update System 2010-04-25 09:48:59 EDT
lohit-tamil-fonts-2.4.5-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 K. Sethu 2010-08-04 12:17:55 EDT
I tested in Fedora 13 for the impact of the following change in 66-lohit-tamil.conf introduced on April 19, 2010 by Pravin :

-  <edit name="family" mode="prepend_first" binding="same">
+  <edit name="family" mode="prepend">

(Patch ref: http://web.archiveorange.com/archive/v/yFlHamCSaVYjcOo7xFxD )

With mode="prepend" as it is in current versions, I find the following :

1) The current 66-lohit-tamil.conf does not supersede 65-nonlatin.conf for "sans-serif".  65-nonlatin.conf has TSCu_Paranar font at priority above Lohit Tamil;  and so if TSCu_Paranar Regular and / or TSCu_Paranar Bold are fonts are installed then for sans-serif TSCu_Paranar regular is matched by fontconfig if Regular only or both Regular and Bold are installed. If only Bold is installed then it is matched to sans-serif.   Only if both regular and bold of TSCu_Paranar are NOT installed then Lohit Tamil gets matched to sans-serif.

2) Similarly if gnu-free fonts are installed then due to 60-gnu-free-serif.conf, for serif, it is FreeSerif font that is matched by fontconfig.

Note: To check what fontconfig matches to the 3 genric fonts : mono, serif and sans-serif as well as best font for any font being not categorised as one those three, the 4 commands I use are as follows:

fc-match :lang=ta:family=mono
fc-match :lang=ta:family=serif
fc-match :lang=ta:family=sans
fc-match :lang=ta

For Tamil fonts the 3rd and 4th of the above would always yield identical results.

Next, if the 66-lohit-tamil.conf is with mode="prepend_first" binding="same"   or mode="prepend_first" (without the binding="same"), then in each of these cases I find for all the 4 above commands, "Lohit Tamil" is the result even if TSCu_Paranar and FreeSerif fonts are installed.

Now the issues I have:

What was the intended purpose of 66-lohit-tamil.conf ?

If it is meant to supersede all configs above in the file links (in the /etc/fonts/conf.d  directory) with names starting with number 65 or less to match all 3 generic fonts with Lohit Tamil, then mode="prepend" fails but mode="prepend_first" works right (even without binding="same").

If it is meant to supersede all configs above, only for the case of sans-serif to match with with Lohit Tamil, then  "mode=prepend" fails and  "mode=prepend_first" works right for sans-serif but it also does unintended matches for mono and serif. 

As I understand now, the current 66-lohit-tamil.conf does not serve any purpose. Seek your clarifications please.

K. Sethu
Comment 7 Pravin Satpute 2010-08-05 00:25:54 EDT
reported a new bug https://bugzilla.redhat.com/show_bug.cgi?id=621445

Note You need to log in before you can comment on or make changes to this bug.