Page 1 of 1

[complete] "TomeNet fonts @ Linux" project

Posted: Sun Mar 20, 2016 2:30 pm
by tangar
Goal of this project - to port my decorative font from Windows to Linux. My font for Windows could be downloaded there in .FON format: ... 16X24X.FON
Its large (16x24) font and it looks like this: ... font-1.jpg

Lets start:

1) Linux uses the PCF format for bitmap font files.

2) At Linux TomeNets' client fonts can't be found at game directory. TomeNet using system bitmap fonts which could be found there (at Ubuntu):

3) windows' client fonts have .FON format and could be edited with Fony -

4) I've read that its impossible to convert .FON to PCF directly, but we could save .FON file in Fony as .bdf and then convert .bdf to PCF

you could download .bdf which I converted there - ... 16x24x.bdf

5) Now we need to convert .BDF to PCF. There is a special command: ... pcf.1.html

bdftopcf 16x24x.bdf > 16x24x.pcf

But font become glitched. When you convert it - it becomes 12 pixels high (not 24 as it has to be): ... ftopcf.jpg

I've tried different options (-o, -i and others) its the same :(

Information about PCF format: ... cf-format/

6) I found Linux bitmap editor to create PCF font from zero - gbdfed hope I'll be able to convert bdf there

it seems bdf was converted right at step 5 :) everything is fine, FontForge just had a glitch of displaying PCF font.

Re: "TomeNet fonts @ Linux" project

Posted: Tue Mar 22, 2016 7:41 pm
by tangar
Solved :) Example screenshot

Download my 16x24 font for Linux: ... 16x24t.pcf

How to install:
1) make sure that you use bitmap fonts (source: ). use terminal:
cd /etc/fonts/conf.d/
sudo rm /etc/fonts/conf.d/10* && sudo rm -rf 70-no-bitmaps.conf && sudo ln -s ../conf.avail/70-yes-bitmaps.conf .
sudo dpkg-reconfigure fontconfig

2) create folder .fonts at your home/<user> directory and copy there 16x24t.pcf (to show hidden files use ctrl+h). So you would have: /home/<user>/.fonts

3) use terminal
cd home/<user>/.font
xset fp+ /home/<user>/.fonts

4) change font in TomeNet to 16x24t and enjoy! :) also you could use this font in terminal:
xterm -fn 16x24t

How to convert .FON to Linux format:
1) use Fony - to save your .FON file as .bdf
2) load Linux, open terminal, cd to folder with .bdf file and use command:
bdftopcf <name>.bdf > <name>.pcf

I wanna say big thanks to C.Blue and Mikaelh for help with installing TomeNet at Linux and Mark Leisher, author of gbdfed (font editor program for Linux) for help and consultations about font formats!

Also Mark noticed that converted PCF file a bit wrong:
The SWIDTH values are wrong. They should be 500 instead of 1152. And
FONTBOUNDINGBOX should be 16 24 0 -5.
but it still works :)

Re: [complete] "TomeNet fonts @ Linux" project

Posted: Mon Mar 05, 2018 2:33 pm
by tangar
Serega wrote in comments of my russian guide - an instruction considering porting fonts from .FON to linux. It's in Russian, but it's easy enough to use google translate:

в Linux используйте скрипт для шрифтов в MAIN_FONT= и SMALLER_FONT= поставить свой,
chmod +x

В папку home//.fonts скопировать шрифт
cd home//.fonts
xset fp+ /home//.fonts
графика в Linux ,нужно переименовать фаил font-custom-21X31TG.prf в нижний регистр font-custom-21x31tg.prf и сохранить в UTF-8 кодировке, скопировать в tomenet-4.7.1-linux-amd64/lib/user , запускаю через скрипт у меня MAIN_FONT=”21x31tg” . Вот и деревья появились **) Tangar благодарю за графику.
После перезагрузки может не найти шрифт , в начало скрипта добавить:
xset fp+ ~/.fonts
xset fp rehash