Bug 531105 - Useless font auto-installer calls
Summary: Useless font auto-installer calls
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-26 22:04 UTC by Nicolas Mailhot
Modified: 2010-07-08 09:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-08 09:15:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Untested patch (1.54 KB, patch)
2009-10-29 00:54 UTC, Behdad Esfahbod
no flags Details | Diff

Description Nicolas Mailhot 2009-10-26 22:04:15 UTC
The font stack triggers the PK font auto-installer for stuff like N'ko or Ancient Persian for which fontconfig has no orthography

Therefore, those calls will never succeed and the user is bothered for no good reason

fc-query/cache should also generate PK metadata for unicode blocks, so that when the font stack needs a glyph which is not part of an orthography, PK can search for fonts that cover the corresponding unicode block (stuff like symbols will probably never make it in an orth)

Comment 1 Behdad Esfahbod 2009-10-26 22:17:15 UTC
(In reply to comment #0)
> The font stack triggers the PK font auto-installer for stuff like N'ko or
> Ancient Persian for which fontconfig has no orthography
> 
> Therefore, those calls will never succeed and the user is bothered for no good
> reason

This is surely a bug.  And easy to fix, in at least two ways on the PK side:

1) Only show a dialog if there's any font supporting that language.  This was supposed to be the default.  Not sure why it wasn't implemented this way.

2) In the GTK+ module, use FcLangGetCharset() to check whether fc knows about the language.

IMO both of them should be done.

> fc-query/cache should also generate PK metadata for unicode blocks, so that
> when the font stack needs a glyph which is not part of an orthography, PK can
> search for fonts that cover the corresponding unicode block (stuff like symbols
> will probably never make it in an orth)  

Not a huge fan of this.  Lets add orth's where missing.

Comment 2 Nicolas Mailhot 2009-10-26 22:35:46 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > The font stack triggers the PK font auto-installer for stuff like N'ko or
> > Ancient Persian for which fontconfig has no orthography
> > 
> > Therefore, those calls will never succeed and the user is bothered for no good
> > reason
> 
> This is surely a bug.  And easy to fix, in at least two ways on the PK side:
> 
> 1) Only show a dialog if there's any font supporting that language.  This was
> supposed to be the default.  Not sure why it wasn't implemented this way.

PK asks for permission to search for fonts, and since it has not searched yet, it does not know if there's any font supporting that language yet

Comment 3 Richard Hughes 2009-10-27 10:32:25 UTC
(In reply to comment #1)
> 1) Only show a dialog if there's any font supporting that language.  This was
> supposed to be the default.  Not sure why it wasn't implemented this way.

We're working with the yum guys to make this possible.

> 2) In the GTK+ module, use FcLangGetCharset() to check whether fc knows about
> the language.

At what point should the module call FcLangGetCharset? Somewhere like http://cgit.freedesktop.org/packagekit/tree/contrib/gtk-module/pk-gtk-module.c#n229 ?

Richard.

Comment 4 Nicolas Mailhot 2009-10-27 10:58:39 UTC
(In reply to comment #1)
> (In reply to comment #0)
 
> > fc-query/cache should also generate PK metadata for unicode blocks, so that
> > when the font stack needs a glyph which is not part of an orthography, PK can
> > search for fonts that cover the corresponding unicode block (stuff like symbols
> > will probably never make it in an orth)  
> 
> Not a huge fan of this.  Lets add orth's where missing.  

So if I submitted a fontconfig rfe to add an .orth for math symbols, engineering symbols, dingbats, ancient persian, etc would it be accepted?
If yes what namespace should be used for those orths? I think ancient scripts have standardised ids ISO-side, but symbols?

Comment 5 Behdad Esfahbod 2009-10-29 00:54:02 UTC
Created attachment 366524 [details]
Untested patch

Comment 6 Behdad Esfahbod 2009-10-29 00:55:23 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > (In reply to comment #0)
> 
> > > fc-query/cache should also generate PK metadata for unicode blocks, so that
> > > when the font stack needs a glyph which is not part of an orthography, PK can
> > > search for fonts that cover the corresponding unicode block (stuff like symbols
> > > will probably never make it in an orth)  
> > 
> > Not a huge fan of this.  Lets add orth's where missing.  
> 
> So if I submitted a fontconfig rfe to add an .orth for math symbols,
> engineering symbols, dingbats, ancient persian, etc would it be accepted?
> If yes what namespace should be used for those orths? I think ancient scripts
> have standardised ids ISO-side, but symbols?  

Oh, that's what you meant.  I believe there's a bug upstream about it?  That's a separate issue and we need to figure it out, yeah.

Comment 7 Richard Hughes 2009-10-29 11:02:42 UTC
Please can you try the build of PackageKit here: http://koji.fedoraproject.org/koji/taskinfo?taskID=1776157

You will need to reboot your computer to ensure the packagekitd process has been restarted. Please provide feedback to whether this build fixes this bug. Thanks.

Richard.

Comment 8 Matthias Clasen 2009-10-31 04:32:46 UTC
Tag has been requested

Comment 9 Bug Zapper 2009-11-16 14:22:46 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


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