[kbd] Please support narrow no-break space (U+202F)

Nicolas Delvaux nicolas.delvaux at gmx.com
Sun Sep 5 19:39:13 UTC 2010


Le vendredi 03 septembre 2010 à 01:50 +0200, Nicolas Delvaux a écrit :

> 
> 
> > As a side-note to the request, you can change your local psfu fonts
> > using psftools (from freshmeat if your distro doesn't supply it):
> > txt2psf to reproduce the font in a text form ('-' for blank pixels,
> > '#' for lit pixels),
> > 
> >  edit it to add more characters to the space glyph - e.g.
> > 
> > Unicode: [00000020];[000000a0];[0000202f];
> > 
> >  (to add U+202f to an existing U+00a0).
> > 
> >  and then txt2psf to convert the altered file to a psfu font.
> 
> 
> I wrote a simple script from this which update all fonts.
> This fix this bug for me and, as an extra bonus, it also implement
> most Unicode spaces.
> 
> In the process I noticed that "Lat2-Terminus16.psfu" already supported
> all spaces, except narrow no-break space.
> I also noticed that some fonts have some duplicate mapping (eg.
> "UniCyrExt_8x16.psf" have "Unicode:
> [00000020];[000000a0];[000000a0];")
> My script cleans all those things.
> 
> You have to execute this script in the font directory (so from
> "$KBD-SOURCE-DIR/data/consolefonts") and then you will find updated
> fonts in "/tmp/psf".
> Then you just have to replace old ones in the src-dir and make/make
> install.


This was only a partial fix, because fonts that don't have a build-in
Unicode map were still defective.
So I made a patch to update all unimaps files (so the 'data/unimaps'
folder).
You can get it here: http://malaria.perso.sfr.fr/kbd/unimaps.patch

I also made a tar.gz with an updated 'data/consolefonts' folder (thanks
to my script). You can download it here:
http://malaria.perso.sfr.fr/kbd/updated_consolefonts.tar.gz

So, basically, if you apply this patch and replace all fonts by their
updated version, then your KBD will support all Unicode spaces (and so
the 'narrow no-break space' which is the one I primarily want).


You can test with "/usr/bin/printf '\uCODEx\n'" where 'CODE' can be
0020, 00a0, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
200a or 202f.
(Yes, all are different kinds of Unicode spaces. See this site if you
want more details about each char:
http://www.fileformat.info/info/unicode/char/search.htm )

Does it feel as a proper fix for you? If not, how can I improve it?

Regards,
Nicolas

ps: the script to update psf fonts is available here:
http://malaria.perso.sfr.fr/kbd/update-psf.sh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.altlinux.org/pipermail/kbd/attachments/20100905/58141c49/attachment.html>


More information about the kbd mailing list