Custom font format

James Cloos cloos at jhcloos.com
Mon Jan 10 05:58:33 PST 2011


>>>>> "MT" == Michael Thalmeier <michael at thalmeier.at> writes:

MT> We are currently developing an application that is using xlib
MT> directly for all the drawing operations.

MT> Our problem is, that we have a huge library of fonts in a custom
MT> font format, that is currently not supported by the x server.

MT> Does anybody know what would be the best way to deal with such
MT> custom font formats ?

If all you need is bitmap glyphs and are happy with either legacy font
encodings or just plane 0 (the first 16 bits) of unicode/iso10646 then
write a custom X Font Sever for you font format, compile the Xserver
with xfs support, and add that font server to the font path.

Look at Xorg's X Font Server and the Font Server protocol specification
for details on how to write one.  I'm writing this while offline; but
start looking at:

  http://cgit.freedesktop.org/xorg/apps/xfs

for the xfs repository.

If you need anti-aliased glyphs and/or full unicode/10646 then you will
need to add support for your font format to freetype and fontconfig.
But given that you write that you use xlib directly, I expect the first
option will be a closer fit.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



More information about the xorg mailing list