Bug 2430 -- TrueType fonts handling and solution for it
http://bugs.openembedded.net/show_bug.cgi?id=2430
Rolf Leggewie tries to solve problem when TrueType/OpenType fonts are used in OPIE or other environments.
Currently installing new font does not add it into list of available ones as there is no consensus how to handle it. I want to tell how I see it.
1. There will be /etc/update-fonts.d/ directory where packages/environments will add own scripts for handling fonts
2. There will be "update-fonts" package which contain script which calls all those scipts (via "run-parts /etc/update-fonts.d/" command)
3. "opie-ttf-support" script will install "update-qtttffontdir" command in ${bindir} and script which will call it in /etc/update-fonts.d/
4. "fontconfig-utils" will also store own script in /etc/update-fonts.d/
5. packages/ttf-fonts/ttf.inc will RDEPEND on "update-fonts" and will call it in postinst/postrm
6. qpf.bbclass (which should be renamed to qpf.inc and moved to packages/qpf-fonts) will also RDEPEND on "update-fonts" and will call it in postinst/postrm
7. qpf fonts will also RDEPEND on qte-fonts-common which provide "update-qtfontdir" script
This way we have solution which can be extended to any format of fonts and into any environment without changing anything. If someone will create "XDE" which do not use fontconfig but use TrueType fonts then it will only need to install own script into /etc/update-fonts.d/ to have them supported.
Any ideas/objections?
Signature · 5 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant
bloody internet
there was once peace and then the internet came in :-)Quoted 4 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
Rolf Leggewie tries to solve problem when TrueType/OpenType fonts are used in OPIE or other environments.
Current status is at http://oz.leggewie.org/wip/update-fonts.diff
Hello Marcin,
Quoted 23 lines · you
http://bugs.openembedded.net/show_bug.cgi?id=2430
Rolf Leggewie tries to solve problem when TrueType/OpenType fonts are used in OPIE or other environments.
Currently installing new font does not add it into list of available ones as there is no consensus how to handle it. I want to tell how I see it.
1. There will be
/etc/update-fonts.d/directory where packages/environments will add own scripts for handling fonts
2. There will be "update-fonts" package which contain script which calls all those scipts (via "run-parts/etc/update-fonts.d/" command)
3. "opie-ttf-support" script will install "update-qtttffontdir" command in ${bindir} and script which will call it in/etc/update-fonts.d/
4. "fontconfig-utils" will also store own script in/etc/update-fonts.d/
5. packages/ttf-fonts/ttf.inc will RDEPEND on "update-fonts" and will call it in postinst/postrm
6. qpf.bbclass (which should be renamed to qpf.inc and moved to packages/qpf-fonts) will also RDEPEND on "update-fonts" and will call it in postinst/postrm
7. qpf fonts will also RDEPEND on qte-fonts-common which provide "update-qtfontdir" script
Quoted 7 lines
This way we have solution which can be extended to any format of fonts and into any environment without changing anything. If someone will create "XDE" which do not use fontconfig but use TrueType fonts then it will only need to install own script into
/etc/update-fonts.d/to have them supported.Any ideas/objections?
Is such extra level of indirection and multiplexing really required?
Or rather, I wish we separated this matter to 2 separate ones:
1. Adopting reusable pattern for solving task of "need to 'register' objects of arbitrary type".
2. See what kind of registration support required for objects of type fonts.
For 1, I wish we adopted some easy scheme, like, for all packages containing object of type foo, to have in postinstall:
[ -x /usr/bin/update-foo ] && /usr/bin/update-foo
Then, for each specific object type, specific package will handle registration, for example among following (but not limiting to) choices:
1. No registration needed at all - no /usr/bin/update-foo, nothing will be done.
2. In simplest case, /usr/bin/update-foo will be a symlink to tool handling registration for specific environment.
3. If some objects really need registration with different facilities, multiplex scheme as described can be used.
Signature · 2 lines
Best regards, Paul mailto:[email protected]
Quoted 3 lines · Paul Sokolovsky
Monday, January 21, 2008, 3:08:31 PM, Marcin wrote:
Is such extra level of indirection and multiplexing really required?
Yes -- it is required. This way we will have it solved once and will not have to change it just because XDE or PSDE uses fonts in other way.
Quoted 6 lines
Or rather, I wish we separated this matter to 2 separate ones:
1. Adopting reusable pattern for solving task of "need to 'register' objects of arbitrary type".
2. See what kind of registration support required for objects of type fonts.
Feel free to suggest other solution. This one which I summarized was discussed on IRC for quite long time.
Quoted 4 lines
For 1, I wish we adopted some easy scheme, like, for all packages containing object of type foo, to have in postinstall:
[ -x
/usr/bin/update-foo] &&/usr/bin/update-foo
What will be "update-foo" for fonts? Will it be "update-fonts" which Rolf and I suggest or will it be "update-fonts-for-opie"
+ "update-fonts-for-fontconfig" + "update-fonts-for-xde" etc? I have a feeling that you try to force us to go second way.
Quoted 2 lines
Then, for each specific object type, specific package will handle registration
And thats what our suggestion do. If you install "specific object type" (which TrueType/OpenType fonts are) then "specific package" (update-fonts-common + scripts from each system which use TTF) will handle registration of "objects" (fonts) in system.
Quoted 4 lines
for example among following (but not limiting to) choices:
1. No registration needed at all - no
/usr/bin/update-foo, nothing will be done.
And nothing will see TT/OT font.
Quoted 2 lines
2. In simplest case,
/usr/bin/update-foowill be a symlink to tool handling registration for specific environment.
And when user will install other environment then which one will be called?
Quoted 2 lines
3. If some objects really need registration with different facilities, multiplex scheme as described can be used.
If there are scripts only for one environment installed then it is like your 2nd point.
I really do not see a problem where you are trying to find one.
Signature · 4 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant
If you're not the part of solution then you're part of the problem.Hello Marcin,
Quoted 7 lines · you
Quoted 3 lines · Paul Sokolovsky
Monday, January 21, 2008, 3:08:31 PM, Marcin wrote:
Is such extra level of indirection and multiplexing really required?
Yes -- it is required. This way we will have it solved once and will not have to change it just because XDE or PSDE uses fonts in other way.
Yes.
Quoted 29 lines
Quoted 6 lines
Or rather, I wish we separated this matter to 2 separate ones:
1. Adopting reusable pattern for solving task of "need to 'register' objects of arbitrary type".
2. See what kind of registration support required for objects of type fonts.Feel free to suggest other solution. This one which I summarized was discussed on IRC for quite long time.
Quoted 4 lines
For 1, I wish we adopted some easy scheme, like, for all packages containing object of type foo, to have in postinstall:
[ -x
/usr/bin/update-foo] &&/usr/bin/update-fooWhat will be "update-foo" for fonts? Will it be "update-fonts" which Rolf and I suggest or will it be "update-fonts-for-opie"
+ "update-fonts-for-fontconfig" + "update-fonts-for-xde" etc? I have a feeling that you try to force us to go second way.Quoted 2 lines
Then, for each specific object type, specific package will handle registration
And thats what our suggestion do. If you install "specific object type" (which TrueType/OpenType fonts are) then "specific package" (update-fonts-common + scripts from each system which use TTF) will handle registration of "objects" (fonts) in system.
Quoted 6 lines
Quoted 4 lines
for example among following (but not limiting to) choices:
1. No registration needed at all - no
/usr/bin/update-foo, nothing will be done.And nothing will see TT/OT font.
I didn't talk about fonts, I was talking about *generic* scheme
which might be reusable for other (all) kinds of objects and environments.
Quoted 5 lines
Quoted 2 lines
2. In simplest case,
/usr/bin/update-foowill be a symlink to tool handling registration for specific environment.And when user will install other environment then which one will be called?
That depends on object type.
Quoted 5 lines
Quoted 2 lines
3. If some objects really need registration with different facilities, multiplex scheme as described can be used.
If there are scripts only for one environment installed then it is like your 2nd point.
If you think it should be 3rd for fonts, then it must be that way.
Quoted 1 line
I really do not see a problem where you are trying to find one.
I'm usually trying to generalize a solution if its worth that IMHO,
and for OE, a rather large system, having best practices of general solutions is worthy aim IMHO. Still, everything is at right time, so if you think what I've written above is not relevant to current issue at hand, let's skip it.
The described as above font handling is +1 from me.
Signature · 2 lines
Best regards, Paul mailto:[email protected]
Quoted 7 lines · Paul Sokolovsky
Quoted 1 line
I really do not see a problem where you are trying to find one.
I'm usually trying to generalize a solution if its worth that IMHO,
and for OE, a rather large system, having best practices of general solutions is worthy aim IMHO. Still, everything is at right time, so if you think what I've written above is not relevant to current issue at hand, let's skip it.
Paul, I can see what you're up to and I fully agree that such a solution will be very helpful! In the meantime, lets see how people implement the font handling and then we have yet another example of updating entities for different configuration systems which will give us helpful input for when we are ready to emerge these into a generic solution.
Regards,
:M:
Signature · 1 line
Dr. Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de
Quoted 1 line
Any ideas/objections?
Why does there need to be a font list on the filesystem? Is it prohibitive for a GUI to scan all the font files on startup? I'm guessing it is...
Well how about a FUSE filesystem which notices when a font file is changed, and automatically updates the font list? It's just a sort of cache which contains the font name and some other metadata right? Something like what you generate using mkfontdir on X? Or maybe FUSE is not even necessary... just put the timestamp into the list, for each entry, then some init script can stat() each font file, and for each file whose timestamp has changed or it does not have an entry at all, update the list.
Eventually filesystems ought to have extended metadata. Some do already. Then you could query the extended attributes of a font file without having to open the font itself.
IMO installing a font, on any OS, ought to be no harder than copying the file into the right place.
Quoted 6 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
1. There will be
/etc/update-fonts.d/directory where packages/environments will add own scripts for handling fonts
2. There will be "update-fonts" package which contain script which calls all those scipts (via "run-parts/etc/update-fonts.d/" command)
58a64bc4f0e9295e4e68eaf15495ee2eb9e6fbd8
Quoted 4 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
6. qpf.bbclass (which should be renamed to qpf.inc and moved to packages/qpf-fonts)
534f1f70c56da9b3765d9945548652a473177f00
Quoted 4 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
3. "opie-ttf-support" script will install "update-qtttffontdir" command in ${bindir} and script which will call it in
/etc/update-fonts.d/
f99b43a679d7e3cb88c832d1a45162da3cc79d7d
Quoted 4 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
5. packages/ttf-fonts/ttf.inc will RDEPEND on "update-fonts" and will call it in postinst/postrm
cfe5c40d75f5515e747262c2c4f608ed64769eab
Quoted 3 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
4. "fontconfig-utils" will also store own script in
/etc/update-fonts.d/
af80fae0d7e9c049dcc68c4fe19e411a4e60948d
Quoted 6 lines · Marcin Juszkiewicz
http://bugs.openembedded.net/show_bug.cgi?id=2430
6. qpf.bbclass ([...]) will also RDEPEND on "update-fonts" and will call it in postinst/postrm
7. qpf fonts will also RDEPEND on qte-fonts-common which provide "update-qtfontdir" script
00152e23f5366f1e8e84e4b10b210ec4df91ddc2
I will clean things up a bit further wrt fonts, but basically, bug 2430 should be taken care of now.