[MPlayer-dev-eng] Unicode font for gmplayer

Thomas Gaukel oss at thomasx.de
Sun Aug 28 02:17:35 EEST 2016


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:


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 ...


.. 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 

If you want to give it a try:


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


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

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. ;-)


Example conversion run for that:

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

Converting Font : 

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



More information about the MPlayer-dev-eng mailing list