Bug 532237 - gedit defaults to bitmap fonts with kanji
Summary: gedit defaults to bitmap fonts with kanji
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: knm-new-fixed-fonts
Version: 12
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-31 18:41 UTC by Mamoru TASAKA
Modified: 2009-12-05 00:01 UTC (History)
3 users (show)

Fixed In Version: 1.1-10.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-04 23:40:44 UTC
Type: ---


Attachments (Terms of Use)
Very simple test case (8 bytes, text/plain)
2009-10-31 18:41 UTC, Mamoru TASAKA
no flags Details
Snapshot with knm_new-fonts-1.1-5.fc11 (182.67 KB, image/png)
2009-10-31 18:43 UTC, Mamoru TASAKA
no flags Details
snapshot with knm-new-fixed-fonts-1.1-9.fc12 (109.68 KB, image/png)
2009-10-31 18:43 UTC, Mamoru TASAKA
no flags Details

Description Mamoru TASAKA 2009-10-31 18:41:17 UTC
Created attachment 366958 [details]
Very simple test case

Description of problem:
With knm_new-fonts replaced by knm-new-fixed-fonts gedit
shows bitmap fonts by default on gedit, this is very bad.

Version-Release number of selected component (if applicable):
knm-new-fixed-fonts-1.1-9.fc12

How reproducible:
100%

Steps to Reproduce:
1. display the attached text with gedit
2.
3.
  
Actual results:
See attached

Expected results:
See attached

Additional info:
Why does such a thing happen NOW???

Comment 1 Mamoru TASAKA 2009-10-31 18:43:00 UTC
Created attachment 366959 [details]
Snapshot with knm_new-fonts-1.1-5.fc11

Comment 2 Mamoru TASAKA 2009-10-31 18:43:39 UTC
Created attachment 366960 [details]
snapshot with knm-new-fixed-fonts-1.1-9.fc12

Comment 3 Akira TAGOH 2009-11-04 02:23:05 UTC
Hmm, weird. so the suggestion from nim-nim on the package review was wrong and the priority on our fontconfig l10n template won't effects reversely?

Comment 4 Nicolas Mailhot 2009-11-04 09:28:30 UTC
(In reply to comment #3)
> Hmm, weird. so the suggestion from nim-nim on the package review was wrong and
> the priority on our fontconfig l10n template won't effects reversely?  

Unless fontconfig changed its behaviour my advice was correct. *However* it is only correct if the other packages you interact with limit themselves to the few audited fontconfig patterns. If they start being creative (and fontconfig gives people a *lot* of room to be creative) all bets are of.

I've almost given up on CJK font packages. At this stage if CJK packagers do not get together to agree on a common way to use fontconfig (and have Behdad proof it) there is no way to progress. Right now it's a "you have packaged a CJK font; go directly to bugzilla"

http://journal.paul.querna.org/wp-content/uploads/2009/08/monopoly-go-to-jail-card.jpg

Comment 5 Bug Zapper 2009-11-16 14:46:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Akira TAGOH 2009-12-04 04:46:59 UTC
Sorry for taking a long time to work on this.

I finally had a time to confirm the fontconfig behaviour and now see how it behaves on building fontsets in fontconfig. the example should be sufficient to explain how it works but not relevant to this font at all, sorry.

just having the rules in one file like:
<match>
  <test name="lang">
    <string>zh-cn</string>
  </test>
  <test name="family">
    <string>sans-serif</string>
  </test>
  <edit name="family" mode="prepend" binding="same">
    <string>AR PL UKai CN</string>
  </edit>
</match>

and

<match>
  <test name="lang">
    <string>zh-cn</string>
  </test>
  <test name="family">
    <string>sans-serif</string>
  </test>
  <edit name="family" mode="prepend" binding="same">
    <string>AR PL UKai HK</string>
  </edit>
</match>

the first one would behaves similarly to the rules named with the small number. the later one would be one named with the large number. here is the result how fontconfig modifies the pattern:

$ FC_DEBUG=4 fc-match "sans-serif:lang=zh-cn"

...

cConfigSubstitute test pattern any lang Equal "zh-cn"
FcConfigSubstitute test pattern any family Equal "sans-serif"
Substitute match
        pattern any lang Equal "zh-cn"
        pattern any family Equal "sans-serif"
edit
        Edit family Prepend "AR PL UKai CN";

Prepend list before  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDotum"(w) "UnDotumBold"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)
Prepend list after  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDotum"(w) "UnDotumBold"(w) "AR PL UKai CN"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)

...

FcConfigSubstitute test pattern any lang Equal "zh-cn"
FcConfigSubstitute test pattern any family Equal "sans-serif"
Substitute match
        pattern any lang Equal "zh-cn"
        pattern any family Equal "sans-serif"
edit
        Edit family Prepend "AR PL UKai HK";

Prepend list before  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) 
"Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helve
tica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDo
tum"(w) "UnDotumBold"(w) "AR PL UKai CN"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)
Prepend list after  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDotum"(w) "UnDotumBold"(w) "AR PL UKai CN"(w) "AR PL UKai HK"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)



Since the testing pattern is "sans-serif" and the editing pattern is always inserted prior to "sans-serif" in the "prepend" mode, I see it's impossible that the number in the filename effects reversely for CIJK fonts no matter what we do use the language-specific overrides rules for them.

I guess you may be confused to the "append" mode? in the append mode, later one is used prior to the early one right:

FcConfigSubstitute test pattern any lang Equal "zh-cn"
FcConfigSubstitute test pattern any family Equal "sans-serif"
Substitute match
        pattern any lang Equal "zh-cn"
        pattern any family Equal "sans-serif"
edit
        Edit family Append "AR PL UKai CN";

Append list before  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "
Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvet
ica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDot
um"(w) "UnDotumBold"(w) "sans-serif"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)
Append list after  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "V
erdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helveti
ca"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDotu
m"(w) "UnDotumBold"(w) "sans-serif"(w) "AR PL UKai CN"(w) "Roya"(w) "Koodak"(w) 
"Terafik"(w)

FcConfigSubstitute test pattern any lang Equal "zh-cn"
FcConfigSubstitute test pattern any family Equal "sans-serif"
Substitute match
        pattern any lang Equal "zh-cn"
        pattern any family Equal "sans-serif"
edit
        Edit family Append "AR PL UKai HK";

Append list before  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDotum"(w) "UnDotumBold"(w) "sans-serif"(w) "AR PL UKai CN"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)
Append list after  "DejaVu Sans"(w) "Bitstream Vera Sans"(w) "DejaVu Sans"(w) "Verdana"(w) "Arial"(w) "Albany AMT"(w) "Luxi Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Lucida Sans Unicode"(w) "BPG Glaho International"(w) "Tahoma"(w) "UnDotum"(w) "UnDotumBold"(w) "sans-serif"(w) "AR PL UKai HK"(w) "AR PL UKai CN"(w) "Roya"(w) "Koodak"(w) "Terafik"(w)

Comment 7 Nicolas Mailhot 2009-12-04 07:02:10 UTC
(In reply to comment #6)
> Sorry for taking a long time to work on this.

Sorry about this, I was confused by the vocabulary fontconfig uses, and had no time to double-check it again

It has already been fixed in fontpackages-devel documentation, I should have remembered to notify you

Comment 8 Akira TAGOH 2009-12-04 09:40:33 UTC
No problem. I think I had a great opportunity to see how it works :)

Anyway, fixed in knm-new-fixed-fonts-1.1-10.fc{10,11,12,13}.

Comment 9 Fedora Update System 2009-12-04 09:41:18 UTC
knm-new-fixed-fonts-1.1-10.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/knm-new-fixed-fonts-1.1-10.fc12

Comment 10 Fedora Update System 2009-12-04 09:42:02 UTC
knm-new-fixed-fonts-1.1-10.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/knm-new-fixed-fonts-1.1-10.fc11

Comment 11 Fedora Update System 2009-12-04 09:43:19 UTC
knm-new-fixed-fonts-1.1-10.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/knm-new-fixed-fonts-1.1-10.fc10

Comment 12 Fedora Update System 2009-12-04 23:40:39 UTC
knm-new-fixed-fonts-1.1-10.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2009-12-04 23:41:39 UTC
knm-new-fixed-fonts-1.1-10.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2009-12-05 00:01:12 UTC
knm-new-fixed-fonts-1.1-10.fc11 has been pushed to the Fedora 11 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.