FS#11082 - Polish character set for 08-Atadore font

Attached to Project: Rockbox
Opened by Tomasz Kowalczyk (mitk) - Sunday, 07 March 2010, 09:50 GMT
Last edited by Alexander Levin (fml2) - Sunday, 14 March 2010, 19:46 GMT
Task Type Patches
Category Font/charset
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Polish character set for 08-Atadore font.
This task depends upon

Closed by  Alexander Levin (fml2)
Sunday, 14 March 2010, 19:46 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed in r25179 and r25180. Thanks!
Comment by Alexander Levin (fml2) - Wednesday, 10 March 2010, 22:27 GMT
Tomasz, without having tested the patch, I'd like to note that IMO it would be better when it contained only the parts than have really been changed. IIUC you added 16 new glyphs. To find them and leave only them in the patch (and the corrected comments of course) is really not hard. That way we would better see what has been changed. BDF is a really simple text based file format.

Thank you for you work!
Comment by Tomasz Kowalczyk (mitk) - Thursday, 11 March 2010, 15:00 GMT

Interesting link:

Please take a look at glyph 00C1;Aacute;LATIN CAPITAL LETTER A WITH ACUTE
Aacute is Glyph Name

In my patch it is:

-STARTCHAR capital A, acute accent

from fonts directory:
[88] tomekk@tyfus:~/workspace/rockbox/fonts$ ls -Al *.bdf | wc -l
[89] tomekk@tyfus:~/workspace/rockbox/fonts$ grep -c Aacute *.bdf | grep ":0"| wc -l
[90] tomekk@tyfus:~/workspace/rockbox/fonts$ grep -c Aacute *.bdf | grep ":1"| wc -l

We have 73 fonts in rockbox
16 uses something similiar to Unicode Glyph Name
57 uses Glyph Names exactly

1. It seems to be that standard for Rockbox fonts is Glyph Name not Unicode Glyph Name
2. STARTCHAR field in glyph record is not used by rockbox at all. It's needed for PostScript mapping or something (don't know exactly).
3. Leaving only new glyphs in my patch is the right way to mix Glyph Names with Unicode Glyph Names in one font file.
4. FontForge during export font to bdf uses Glyph Names, so every subsequent add to mixed font file will need more and more manual work on patch file

What I should do with this patch finally?
Please take into account that knowledge of fonts is 1 hour with FontForge and 2 hours with google
so please fixme if I'm wrong in any point.

Comment by Alexander Levin (fml2) - Thursday, 11 March 2010, 17:36 GMT
What I mean is that each patch should be as atomic as possible, i.e. do only one thing. Your patch does two at the same time: adding new glyphs and changing the glyph names (which of course don't matter at all). Hence I propose that we split this into two patches for better traceability of changes.

1. Adding new glyphs (cleaned patch attached, but I haven't tested it, just edited your patch; please test whether it applies cleanly)
2. Changing glyph names. This should be done by re-exporting the BDF font from FontForge after applying the first patch (I can't do it now)

I'm not against renaming glyphs at all; I'd just do one thing at a time.

Some more notes:

1. STARTCHAR records are of course used, just not by Rockbox itself, but rather by the program that converts BDF to the Rockbox font format (.fnt). How else woult it detect the beginning of a glyph?
2. You also changed the SIZE record. I think it's not used by Rockbox (and the generating program) but still I wouldn'to do it. I think it was automatically changed by FontForge because some other property is set to 9 instead of 8.
3. Rockbox fonts don't follow any standards in naming glyphs. It's more or less by chance that one or the other name is used! :-)

I'll be able to test and commit the patch, but not before Sunday evening GMT. So if you need it before, please ask in the IRC.
Comment by Tomasz Kowalczyk (mitk) - Thursday, 11 March 2010, 20:08 GMT
Tested your patch. No problem with it, it applies cleanly and working good on sim.
I attached tested glyph rename patch which needs to be applied after yours 08-Atadore-pl-charset-patch.2.txt. This patch is from diff, not from svn.

Ad.1 I agree, STARTCHAR label itself is used by font converter, but not it content I think.
Ad.2 Not me. FontForge changed it because in original bdf PIXEL_SIZE is 9. With pixel size set to 8 FontForge doesn't export font to bdf.
Ad.3 Sure, but I think that it's better to keep one standard in one file even when standard changes between files. It should avoid confusions like that in the future.

Thanks for your help