Bug 956192 - [hi_IN] Lohit fonts not getting selected as a default font for hi locale in gnome-shell
[hi_IN] Lohit fonts not getting selected as a default font for hi locale in g...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: lohit-devanagari-fonts (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pravin Satpute
Fedora Extras Quality Assurance
: i18n
Depends On: 871252
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-24 08:31 EDT by A S Alam
Modified: 2013-07-02 21:13 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 961298 (view as bug list)
Environment:
Last Closed: 2013-05-26 23:06:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Screenshot for Issue (44.78 KB, image/png)
2013-04-24 22:30 EDT, A S Alam
no flags Details
FreeSans rendering issues with Harfbuzz NG (6.41 KB, image/png)
2013-04-26 01:19 EDT, Pravin Satpute
no flags Details
pref for gedit (31.25 KB, image/png)
2013-04-26 13:52 EDT, A S Alam
no flags Details
Modified lohit devanagari conf file (3.26 KB, text/plain)
2013-05-09 01:15 EDT, Pravin Satpute
no flags Details
screenshot showing gnu-free-sans getting selected in gnome-shell for hi (4.03 KB, image/png)
2013-05-09 07:20 EDT, Pravin Satpute
no flags Details
expected output, gnome-shell should select lohit as a default font (4.24 KB, image/png)
2013-05-09 07:21 EDT, Pravin Satpute
no flags Details
screenshot (489.96 KB, image/png)
2013-05-14 05:25 EDT, Akira TAGOH
no flags Details

  None (edit)
Description A S Alam 2013-04-24 08:31:14 EDT
Description of problem:
Rendering of Text in Gnome-shell (and gedit) is broken. (May need to move bug for harfbuzz or pango?). but working as expected with Search (with gnome-shell), and Run dialog (Alt+f2)

example Text [क्रियाएँ]


Version-Release number of selected component (if applicable):
lohit-devanagari-fonts-2.5.3-2.fc19.noarch

gnu-free-sans-fonts-20120503-5.fc19.noarch
gnu-free-fonts-common-20120503-5.fc19.noarch
gnu-free-mono-fonts-20120503-5.fc19.noarch
gnu-free-serif-fonts-20120503-5.fc19.noarch

How reproducible:


Steps to Reproduce:
1. Login into Hindi Desktop
2. Check "Acitivies" Rendering
3. Copy (क्रियाएँ) Text
4. Paste in Gedit
5. Press Window (Super) Key and Paste Text in Search
6. Alt + F2 and paste Copied text
7. Run firefox and Paste copied text

Actual results:
Rendering is wrong in step 2 (gnome-shell), 4 (gedit), 


Expected results:
Rendering is correct for Step 5, 6, 7

Additional info:
1. If remove gnu-free-* fonts from system, rendering is fine
2. Bug #918478 is already fixed, but still issue is there for Rendering.



Few more results from terminal on desktop
1.
-
LANG=hi_IN.utf8
LC_CTYPE="hi_IN.utf8"
LC_NUMERIC="hi_IN.utf8"
LC_TIME="hi_IN.utf8"
LC_COLLATE="hi_IN.utf8"
LC_MONETARY="hi_IN.utf8"
LC_MESSAGES="hi_IN.utf8"
LC_PAPER="hi_IN.utf8"
LC_NAME="hi_IN.utf8"
LC_ADDRESS="hi_IN.utf8"
LC_TELEPHONE="hi_IN.utf8"
LC_MEASUREMENT="hi_IN.utf8"
LC_IDENTIFICATION="hi_IN.utf8"
LC_ALL=
--
2
-
[hindi@lenovox230 ~]$ fc-match 
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"
[hindi@lenovox230 ~]$ fc-match :lang=hi
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"
[hindi@lenovox230 ~]$ fc-match :lang=mr
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"
---
Comment 1 Jon Ciesla 2013-04-24 14:45:45 EDT
If it's not occurring everywhere, I'm not convinced the bug is with the fonts, but with something farther down.  Could you attach a screenshot(s) with examples?
Comment 2 A S Alam 2013-04-24 22:30:05 EDT
Created attachment 739642 [details]
Screenshot for Issue

Blue Underline - Rendering is Correct
Red Underline  - Rendering has issue

(sorry for delay in screenshot)
Comment 3 Jon Ciesla 2013-04-25 11:07:01 EDT
Alright, based on that I'm guessing harfbuzz.
Comment 4 Jens Petersen 2013-04-25 21:26:17 EDT
Probably we should not be using GNU Free for Hindi then?

Alam: other Indic scripts/langs are not affected??
Comment 5 Jens Petersen 2013-04-25 23:32:58 EDT
Presumably switching gedit to Lohit Devanagari fixes the rendering there.
Comment 6 Jens Petersen 2013-04-25 23:45:13 EDT
(In reply to comment #5)
> Presumably switching gedit to Lohit Devanagari fixes the rendering there.

Actually doesn't seem to be any Preferences UI now in gedit.
Comment 7 Pravin Satpute 2013-04-26 01:19:13 EDT
Created attachment 740222 [details]
FreeSans rendering issues with Harfbuzz NG

This is problem with FreeSans rather than Harfbuzz. Please check text 

"प्रविण सातपुते क्षत्रिय क्रियांये " with Lohit Devanagari for correct rendering.

Its probem with Rakara feature, if time permits i will provide patch for this.
Comment 8 A S Alam 2013-04-26 10:01:25 EDT
(In reply to comment #4)
> Probably we should not be using GNU Free for Hindi then?
> 
> Alam: other Indic scripts/langs are not affected??

I can confirm Punjabi (Gurmukhi) has issues, other Pravin can confirm.
Comment 9 A S Alam 2013-04-26 13:52:14 EDT
Created attachment 740561 [details]
pref for gedit

Please click (or right click) on gedit icon (which is close to Activities in gnome-shell) and you can get preferences.
Comment 10 Akira TAGOH 2013-05-02 03:22:36 EDT
need to have similar recipe for FreeSans like this for FreeSerif:
http://pkgs.fedoraproject.org/cgit/gnu-free-fonts.git/commit/?id=a6e0de29c2bd9663fd38bf54c4f26fef5507252a
Comment 11 Pravin Satpute 2013-05-09 01:15:28 EDT
Created attachment 745547 [details]
Modified lohit devanagari conf file

After modifying lohit fontconf now i am getting
 
$fc-match serif:lang=hi
$fc-match sans-serif:lang=hi
$fc-match monospace:lang=hi
 
 
But still gnome-shell "activities" showing me FreeSans in output. Just wondering from where it is coming.
Comment 12 Pravin Satpute 2013-05-09 07:20:17 EDT
Created attachment 745617 [details]
screenshot showing gnu-free-sans getting selected in gnome-shell for hi
Comment 13 Pravin Satpute 2013-05-09 07:21:34 EDT
Created attachment 745621 [details]
expected output, gnome-shell should select lohit as a default font
Comment 14 Pravin Satpute 2013-05-10 03:12:00 EDT
Further update on this is
1. I tried by adding Latin characters in Lohit: Still same results.
  So i think FreeSans is not getting selected bacuase required characters are missing in Lohit.

2. Tried setting google-noto-devanagari-fonts as a default rather that Lohit Devanagari. Still FreeSans is getting selected in gnome-shell menu items. 

   gedit and all other applications showing proper fonts expect gnome-shell menu's.
Comment 15 Akira TAGOH 2013-05-14 05:25:29 EDT
Created attachment 747592 [details]
screenshot

Doesn't this look like working?
Comment 16 Pravin Satpute 2013-05-15 00:13:19 EDT
Yes, it is !!

How did you achieved it?
Comment 17 Pravin Satpute 2013-05-15 00:49:12 EDT
$fc-match monospace 
FreeSans.ttf
$fc-match monospace:lang=hi
Lohit-Devanagari.ttf

i think same way we need to handle for Monospace as well.
Comment 18 Akira TAGOH 2013-05-15 04:46:29 EDT
Well, that just looked like working. once the cursor is hovering, the font is getting back to FreeSans. I guess the trick may be something like this:

$ fc-match -s Cantarell,sans:lang=hi
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"
FreeSans.ttf: "FreeSans" "нормален"
Cantarell-Regular.otf: "Cantarell" "Regular"
...

Best font in this query is Lohit though, Lohit doesn't have ASCIIs. so falling back to FreeSans. FreeSans has both Devanagari scripts and ASCIIs. so keep using it.

So the best way/workaround for this issue would be to remove Indic languages from the cache of FreeSans as we agreed in the meeting. did we do that already?
Comment 19 Pravin Satpute 2013-05-15 05:23:30 EDT
No, we are not doing that already. But i will provide patches for that and ask gnu-free-sans maintainer to build it quickly.

Do we need to add any specific fontconfig rule to lohit fonts?
Comment 20 Akira TAGOH 2013-05-15 06:10:37 EDT
No. gnu-free-fonts won't be selected after that change. so this issue shouldn't happens.
Comment 21 Pravin Satpute 2013-05-15 07:08:54 EDT
Yes, verified the fix with building gnu-free-fonts srpm  http://pravins.fedorapeople.org/gnu-free-fonts-20120503-6.fc18.src.rpm

I did reopened the old bug itself and provided patch there.

Thanks a lot Tagoh for analysis of this bug. :)
Comment 22 Pravin Satpute 2013-05-16 00:53:07 EDT
(In reply to comment #18)
> Well, that just looked like working. once the cursor is hovering, the font
> is getting back to FreeSans. I guess the trick may be something like this:
> 
> $ fc-match -s Cantarell,sans:lang=hi
> Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"
> FreeSans.ttf: "FreeSans" "нормален"
> Cantarell-Regular.otf: "Cantarell" "Regular"
> ...
> 
> Best font in this query is Lohit though, Lohit doesn't have ASCIIs. so
> falling back to FreeSans. FreeSans has both Devanagari scripts and ASCIIs.
> so keep using it.
  We are trying to add ASCII to lohit, that is long pending issue. Another problem of that is when using Lohit as a Web fonts ASCII fallback is unpredictiable and manytimes does not match with Lohit style.

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