Bug 682716

Summary: [pa_IN] Default font is not lohit punjabi
Product: [Fedora] Fedora Reporter: Jaswinder Singh <jsingh>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: aalam, ankit, caolanm, dtardon, i18n-bugs, ltinkl
Target Milestone: ---Keywords: i18n, Triaged
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreoffice-3.3.1.2-6.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 683122 (view as bug list) Environment:
Last Closed: 2011-03-16 04:12:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 683122    
Attachments:
Description Flags
default font is Lohit Punjabi
none
pa-IN libreoffice-writer screen shot for fonts none

Description Jaswinder Singh 2011-03-07 11:36:22 UTC
Description of problem: Default fonts are not lohit punjabi


Version-Release number of selected component (if applicable): 3.3.1.2-1


How reproducible:


Steps to Reproduce:
1. Run libreoffice-writer, libreoffice-calc, libreoffice-imprees (all three one-by-one)
2. Check in font bar (Default fonts are not lohit punjabi)
3.
  
Actual results: Default fonts are "DejaVu Sans Condensed"


Expected results: Default fonts should be Lohit Punjabi


Additional info:

Comment 1 David Tardon 2011-03-07 12:24:12 UTC
I suppose you are speaking about pa_IN locale, right?

Comment 2 David Tardon 2011-03-07 13:03:37 UTC
Created attachment 482670 [details]
default font is Lohit Punjabi

works here with libreoffice-writer-3.3.1.2-1.fc15.x86_64

Comment 3 Jaswinder Singh 2011-03-07 14:00:46 UTC
Here I am testing on i686 machine and package version is same.
Attaching screen shot also.

Comment 4 Jaswinder Singh 2011-03-07 14:02:55 UTC
Created attachment 482685 [details]
pa-IN libreoffice-writer screen shot for fonts

Comment 5 Jaswinder Singh 2011-03-07 14:04:19 UTC
(In reply to comment #1)
> I suppose you are speaking about pa_IN locale, right?

Yes I am talking about pa_IN locale.

Comment 6 David Tardon 2011-03-08 06:46:50 UTC
Is the locale set correctly, i.e., what is the output of

locale

? Does it work if you start writer from cmdline as

LC_ALL=pa_IN oowriter

?

Comment 7 Caolan McNamara 2011-03-08 11:57:19 UTC
The first font in VCL.xcu for pa-IN is "Raavi", so we ask fontconfig for that, and use whatever it returns as the best match for Raavi for lang pa-IN.

So, what's the output of...

fc-match :lang=pa-IN

and, for reference, the output of e.g.

fc-match :lang=kn_IN

Comment 8 Caolan McNamara 2011-03-08 12:02:23 UTC
I get Droid Sans for

fc-match :lang=pa-IN

but Lohit Punjabi for

fc-match :lang=pa

if I hack LibreOffice to substitute pa for pa-IN then I get Lohit Punjabi as the fontconfig suggested font, some investigation into fontconfig here is indicated I guess

Comment 9 Caolan McNamara 2011-03-08 14:20:47 UTC
If I could just get fontconfig to sort fonts that match "pa" before fonts that provide "pa-pk" when looking for "pa-in" then I'd clear the problem which I see here. Though I can't fathom why you get "DejaVu Sans Condensed"

Comment 10 Caolan McNamara 2011-03-08 16:05:25 UTC
See bug 683122 for suggested fix to fontconfig for the problem I see. I'll hack a workaround into LibreOffice as well in the meantime

Comment 11 Caolan McNamara 2011-03-08 16:18:26 UTC
right, I'll try a workaround to sub "pa" for "pa-IN" when we pass that to fontconfig, though I'm still concerned that what I can reproduce isn't exactly what I see in the screenshot.

Comment 12 A S Alam 2011-03-08 17:58:37 UTC
(In reply to comment #7)
> The first font in VCL.xcu for pa-IN is "Raavi", so we ask fontconfig for that,
> and use whatever it returns as the best match for Raavi for lang pa-IN.
> 
> So, what's the output of...
> 
> fc-match :lang=pa-IN
> 
> and, for reference, the output of e.g.
> 
> fc-match :lang=kn_IN

I have concern about "Raavi" here, which is default Punjabi (pa-IN) font in Windows. I faced issue previously, when used OpenOffice in Windows as Lohit font is not there. Is it not possible to add more than one font for language?

Comment 13 David Tardon 2011-03-08 18:32:13 UTC
dtardon->aalam: It is--that is why Caolan said "the first font", not "the font". But, on Linux, we use fontconfig fallback for each font in the list if the font is not found by name and fontconfig always returns a match, so we never get past the first font in the list. And because we match by locale (besides other parameters), this is exactly what we want, because it is fonconfig that knows which font should be used on the system for the locale. If we used the VCL's font table exclusively (or even as primary source), we would have to keep it in sync with current font preferences in Fedora/RHEL and that would just... not be easy :-)

Comment 14 A S Alam 2011-03-09 01:33:22 UTC
(In reply to comment #13)
> dtardon->aalam: It is--that is why Caolan said "the first font", not "the

Thanks. I got it now.

Comment 15 Fedora Update System 2011-03-09 08:44:04 UTC
libreoffice-3.3.1.2-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/libreoffice-3.3.1.2-5.fc15

Comment 16 Fedora Update System 2011-03-10 08:53:27 UTC
libreoffice-3.3.1.2-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/libreoffice-3.3.1.2-6.fc15

Comment 17 Fedora Update System 2011-03-16 04:12:18 UTC
libreoffice-3.3.1.2-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.