Bug 956192 - [hi_IN] Lohit fonts not getting selected as a default font for hi locale in gnome-shell
Summary: [hi_IN] Lohit fonts not getting selected as a default font for hi locale in g...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lohit-devanagari-fonts
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pravin Satpute
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 871252
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 12:31 UTC by A S Alam
Modified: 2013-07-03 01:13 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 961298 (view as bug list)
Environment:
Last Closed: 2013-05-27 03:06:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Screenshot for Issue (44.78 KB, image/png)
2013-04-25 02:30 UTC, A S Alam
no flags Details
FreeSans rendering issues with Harfbuzz NG (6.41 KB, image/png)
2013-04-26 05:19 UTC, Pravin Satpute
no flags Details
pref for gedit (31.25 KB, image/png)
2013-04-26 17:52 UTC, A S Alam
no flags Details
Modified lohit devanagari conf file (3.26 KB, text/plain)
2013-05-09 05:15 UTC, 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 11:20 UTC, Pravin Satpute
no flags Details
expected output, gnome-shell should select lohit as a default font (4.24 KB, image/png)
2013-05-09 11:21 UTC, Pravin Satpute
no flags Details
screenshot (489.96 KB, image/png)
2013-05-14 09:25 UTC, Akira TAGOH
no flags Details

Description A S Alam 2013-04-24 12:31:14 UTC
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 Gwyn Ciesla 2013-04-24 18:45:45 UTC
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-25 02:30:05 UTC
Created attachment 739642 [details]
Screenshot for Issue

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

(sorry for delay in screenshot)

Comment 3 Gwyn Ciesla 2013-04-25 15:07:01 UTC
Alright, based on that I'm guessing harfbuzz.

Comment 4 Jens Petersen 2013-04-26 01:26:17 UTC
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-26 03:32:58 UTC
Presumably switching gedit to Lohit Devanagari fixes the rendering there.

Comment 6 Jens Petersen 2013-04-26 03:45:13 UTC
(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 05:19:13 UTC
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 14:01:25 UTC
(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 17:52:14 UTC
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 07:22:36 UTC
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 05:15:28 UTC
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 11:20:17 UTC
Created attachment 745617 [details]
screenshot showing gnu-free-sans getting selected in gnome-shell for hi

Comment 13 Pravin Satpute 2013-05-09 11:21:34 UTC
Created attachment 745621 [details]
expected output, gnome-shell should select lohit as a default font

Comment 14 Pravin Satpute 2013-05-10 07:12:00 UTC
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 09:25:29 UTC
Created attachment 747592 [details]
screenshot

Doesn't this look like working?

Comment 16 Pravin Satpute 2013-05-15 04:13:19 UTC
Yes, it is !!

How did you achieved it?

Comment 17 Pravin Satpute 2013-05-15 04:49:12 UTC
$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 08:46:29 UTC
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 09:23:30 UTC
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 10:10:37 UTC
No. gnu-free-fonts won't be selected after that change. so this issue shouldn't happens.

Comment 21 Pravin Satpute 2013-05-15 11:08:54 UTC
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 04:53:07 UTC
(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.