Bug 682716 - [pa_IN] Default font is not lohit punjabi
[pa_IN] Default font is not lohit punjabi
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: libreoffice (Show other bugs)
15
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Caolan McNamara
Fedora Extras Quality Assurance
: i18n, Triaged
Depends On:
Blocks: 683122
  Show dependency treegraph
 
Reported: 2011-03-07 06:36 EST by Jaswinder Singh
Modified: 2013-03-03 21:19 EST (History)
6 users (show)

See Also:
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 00:12:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
default font is Lohit Punjabi (366.87 KB, image/png)
2011-03-07 08:03 EST, David Tardon
no flags Details
pa-IN libreoffice-writer screen shot for fonts (82.68 KB, image/png)
2011-03-07 09:02 EST, Jaswinder Singh
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 35118 None None None Never

  None (edit)
Description Jaswinder Singh 2011-03-07 06:36:22 EST
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 07:24:12 EST
I suppose you are speaking about pa_IN locale, right?
Comment 2 David Tardon 2011-03-07 08:03:37 EST
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 09:00:46 EST
Here I am testing on i686 machine and package version is same.
Attaching screen shot also.
Comment 4 Jaswinder Singh 2011-03-07 09:02:55 EST
Created attachment 482685 [details]
pa-IN libreoffice-writer screen shot for fonts
Comment 5 Jaswinder Singh 2011-03-07 09:04:19 EST
(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 01:46:50 EST
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 06:57:19 EST
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 07:02:23 EST
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 09:20:47 EST
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 11:05:25 EST
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 11:18:26 EST
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 12:58:37 EST
(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 13:32:13 EST
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-08 20:33:22 EST
(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 03:44:04 EST
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 03:53:27 EST
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 00:12:18 EDT
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.

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