Bug 621445 - .conf should use 65-0 to override 65-non-latin TSCu_Paranar
Summary: .conf should use 65-0 to override 65-non-latin TSCu_Paranar
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lohit-tamil-fonts
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Pravin Satpute
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-05 04:23 UTC by Pravin Satpute
Modified: 2010-11-13 22:01 UTC (History)
5 users (show)

Fixed In Version: lohit-tamil-fonts-2.4.5-6.fc13
Clone Of:
Environment:
Last Closed: 2010-10-18 05:40:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pravin Satpute 2010-08-05 04:23:14 UTC
Description of problem:
discussion on bug #578039


Version-Release number of selected component (if applicable):
lohit-tamil-fonts-2.4.5-3.fc13.noarch

How reproducible:
everytime

Steps to Reproduce:
1.
2.
3.
  
Actual results:
not detecting lohit as default font

Expected results:
should detect lohit as default font

Additional info:

Comment 1 Pravin Satpute 2010-08-05 04:24:51 UTC
from https://bugzilla.redhat.com/show_bug.cgi?id=578039#c6

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 2 Pravin Satpute 2010-08-05 04:29:07 UTC
(In reply to comment #6)
> 
> 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.

Yes, i will fix this by making lohit tamil priority 65-0

> 
> 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.

This is really bug from gnu-free fonts, they should not use this priority
see "/usr/share/fontconfig/templates/fontconfig-priorities.txt"

"65-69 Fonts with less common encodings, ending with fonts that provide,        coverage of exotic unicode blocks at the expense of drawing,quality"

should report bug against them

but one more thing 
gnu-free providing serif fonts, and lohit is sans
so it is ok if gnu-free get selected for
fc-match serif:lang=ta

Comment 3 K. Sethu 2010-08-05 06:34:10 UTC
(In reply to comment #2)
> (In reply to comment #6)
> > 
> > 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.
> 
> Yes, i will fix this by making lohit tamil priority 65-0
> 

To supersede with language specific matching from above (i.e. in /etc/font/conf.d/ with a config file link name starting with less than 65-n to supersede 65-nonlatin.conf) there is another method not using mode="prepend" . That method is not included in the Fedora tips at : http://fedoraproject.org/wiki/Fontconfig_packaging_tips#Locale-specific_overrides  

For the other method we make 65-lohit-tamil.conf as follows :

-----------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Tamil (ta) -->
<match target="font">
        <test name="lang" compare="contains">
                <string>ta</string>
        </test>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Lohit Tamil</family> 
                </prefer>
	</alias>
</match>

<!-- Tamil (ta) ends -->
</fontconfig>
---------------------------------------------------------

Then since 65-lohit-tamil.conf is less than 65-nonlatin.conf the above should supersede 65-nonlatin.conf . Though I have not tested yet with 65 (which I will do later tonight) using 63,  I have found that the above matches sans-serif with Lohit Tamil for Tamil language contents but not for any other languages, and regardless of the locale in which desktop is operated. 

> > 
> > 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.
> 
> This is really bug from gnu-free fonts, they should not use this priority
> see "/usr/share/fontconfig/templates/fontconfig-priorities.txt"
> 
> "65-69 Fonts with less common encodings, ending with fonts that provide,       
> coverage of exotic unicode blocks at the expense of drawing,quality"
> 
> should report bug against them
> 

But in Ubuntus installing the deb package for the same Free Fonts does not pump in the 60-gnu-free-serif.conf, 60-gnu-free-sans.conf and 60-gnu-free-mono.conf . Aren't those inclusions in Fedora made by Fedora's packagers for gnu-free ? 

> but one more thing 
> gnu-free providing serif fonts, and lohit is sans
> so it is ok if gnu-free get selected for
> fc-match serif:lang=ta    

There are some contents in web sites, such as some buttons in ta.wikipedia.org are detected as serif and when FreeSerif is matched to serif those content, if in bold, do not get rendered since the bold version of Free Serif does not have Tamil glyphs. Also FreeSerif regular font's coverage of Tamil glyphs is not comprehensive with many symbols and some late additions to Unicode missing. I will attach some screen shots later tonight to show those problems.

K. Sethu

Comment 4 Akira TAGOH 2010-08-05 07:38:03 UTC
(In reply to comment #1)
> 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.

That's because there were no Tamil fonts packages competed in Fedora. since 65-nonlatin.conf is provided as is from upstream, they just thinks TSCu_Paranar may be better than Lohit. you can file a bug to upstream if in doubt. but it's not our bug since the fonts packages has own rule to set up. when TSCu_paranar is available in Fedora, we can revisit this issue later. otherwise I don't see any urgent to fix that because we could assume that users may wants to use it by default since they installed that by themselves.

> 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.

That's a bit rare case and current policy doesn't deal with it properly. that should be discussed in the list but not here. and it's also not something can be fixed in this package only.

> 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.

Using prepend_first isn't recommended in even upstream. good to think of what if all of fonts packages uses it.

> Now the issues I have:
> 
> What was the intended purpose of 66-lohit-tamil.conf ?

See comment#0 and the link there in Bug#578039

Comment 5 Akira TAGOH 2010-08-05 07:46:13 UTC
(In reply to comment #3)
> To supersede with language specific matching from above (i.e. in
> /etc/font/conf.d/ with a config file link name starting with less than 65-n to
> supersede 65-nonlatin.conf) there is another method not using mode="prepend" .
> That method is not included in the Fedora tips at :
> http://fedoraproject.org/wiki/Fontconfig_packaging_tips#Locale-specific_overrides 
> 
> For the other method we make 65-lohit-tamil.conf as follows :

There are no difference in the behaviour with "prepend". <prefer> is actually same to that.

> There are some contents in web sites, such as some buttons in ta.wikipedia.org
> are detected as serif and when FreeSerif is matched to serif those content, if
> in bold, do not get rendered since the bold version of Free Serif does not have
> Tamil glyphs. Also FreeSerif regular font's coverage of Tamil glyphs is not
> comprehensive with many symbols and some late additions to Unicode missing. I
> will attach some screen shots later tonight to show those problems.

That would be good to file a bug against gnu-free-fonts.

Comment 6 Pravin Satpute 2010-08-05 10:07:09 UTC
first thing is solved since we don't have a TSCu_Paranar fonts in fedora, so it will work nice, if someone still want use install and use that font then yes it will create problem due to 65-non-latin

i think it will be good to use 65-0 for lohit, since we don't have a control on 65-non-latin, so making 65-0 will make sure that at least in fedora 65-non-latin will not create changes for default fonts configuration

this is not bug presently but for enhancement, i will do 65-0 in next build, even we are using 65-0 for smc-fonts

reported bug for gnu-free https://bugzilla.redhat.com/show_bug.cgi?id=621498

Comment 7 Pravin Satpute 2010-08-25 10:21:19 UTC
i was just wondering why TSCu_Paranar is not in fedora

there is mess with its license, at one place it is given that it is released "Released Under the GNU GPL, Dec. 2002." and at other place it is written "Not for commercial use"

Comment 8 Fedora Update System 2010-08-25 10:30:39 UTC
lohit-tamil-fonts-2.4.5-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-4.fc13

Comment 9 Fedora Update System 2010-08-25 10:31:20 UTC
lohit-tamil-fonts-2.4.5-4.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-4.fc14

Comment 10 Fedora Update System 2010-08-25 13:29:59 UTC
lohit-tamil-fonts-2.4.5-4.fc14 has been pushed to the Fedora 14 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-4.fc14

Comment 11 Fedora Update System 2010-09-10 10:15:47 UTC
lohit-tamil-fonts-2.4.5-5.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-5.fc13

Comment 12 Fedora Update System 2010-09-10 10:17:28 UTC
lohit-tamil-fonts-2.4.5-5.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-5.fc14

Comment 13 Fedora Update System 2010-09-16 06:06:03 UTC
lohit-tamil-fonts-2.4.5-6.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-6.fc13

Comment 14 Fedora Update System 2010-09-16 06:07:54 UTC
lohit-tamil-fonts-2.4.5-6.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/lohit-tamil-fonts-2.4.5-6.fc14

Comment 15 Fedora Update System 2010-10-18 05:40:05 UTC
lohit-tamil-fonts-2.4.5-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2010-11-13 22:00:53 UTC
lohit-tamil-fonts-2.4.5-6.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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