Web lists-archives.com

[MPlayer-dev-eng] Unicode font for gmplayer




Hello,

IB recently increased the number of characters that are possible in the gmplayer fnt/png file combination, as discussed in ticket #2303.

Meanwhile I did a little digging to find some fonts, and did indeed find some useful bitmap fonts from X.org, which are public domain:

http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

I picked two of them for testing:

- A "Western" Font file based on 6x12.bdf (4522 chars)
  ( -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1 )

- A "Japanese" Font file based on 12x13ja.bdf (19197 chars)
  ( -Misc-Fixed-Medium-R-Normal-ja-13-120-75-75-C-120-ISO10646-1 )


And based on a bdf2png script from Desmond Lee ...

http://search.cpan.org/~dclee/Font-BDF-Reader-0.01/bin/bdf2png

.. it was not too difficult to write a script to convert the bdf Font files to fnt/png - pairs. I think there is still a little empty space wasted in the PNGs. But hey, they are still smaller than the FNTs. ;-)

I created a modified Blue Skin which uses the western UTF Font for the title label, while using the existing standard font for the time and the other labels (The numbers seem to be a little too wide in 6x12, and of course even wider in the 12x13 Japanese font)

The Japanese font file is include, but not activated. If you want to try it you just have to replace the two instances of "font-utf" with "font-jp" in the skin file.

I also added a "font-comb" pnt/fnt pair, where I included both the 12x13ja.bdf and the 8x13.bdf fonts, and used the glyphs in the FNT accordingly.


If you want to give it a try:

http://www.thomasx.de/download/Blue-UTF.tar.gz

I also uploaded the Perl script to convert the BDF-files:

http://www.thomasx.de/download/bdf2mplayer

It might of course still need some tweaking, but so far it worked quite nice for me.


PS:
Another interesting project might be GNU Unifont, but the 16 pixel height doesn't really fit any existing skin. But with almost all 65,536 Unicode characters it might be a good candidate if someone wants to do some performance testing. ;-)

http://unifoundry.com/unifont.html

Example conversion run for that:

======
$ ./bdf2mplayer unifont-9.0.01.bdf font-gnu-unifont 0

Converting Font : -gnu-Unifont-Medium-R-Normal-Sans-16-160-75-75-c-80-iso10646-1

------------------------------------------
License : "Copyright (C) 2015 Roman Czyborra, Paul Hardy, Qianqian Fang, Andrew Miller, et al. Licensed under the GNU General Public License; either version 2, or (at your option) a later version, with the GNU Font Embedding Exception."
------------------------------------------
 - Font contains  57086 glyps
 - PNG Size       4031 x 3455
 - Consisting of  215 lines with a height of 16
 Codepoint: 65533 Char: �  count : 57086 ....

Writing PNG File....
Processing finished
======



Cheers,

Thomas



_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng