kicad/helpers/gal_bitmap_font
decimad f78721b451 Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
..
README Increased interglyph spacing to avoid artifacts when mipmapping is enabled. 2016-05-02 16:14:26 +02:00
UbuntuMono-R.ttf_sdf.png Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
UbuntuMono-R.ttf_sdf.txt Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
bitmap_font.fnt Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
bitmap_font.png Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
bitmap_font_2048.fnt Fixed display of 'b' letter in OpenGL canvas. 2016-05-27 14:44:44 +02:00
bitmap_font_2048_0.png Fixed display of 'b' letter in OpenGL canvas. 2016-05-27 14:44:44 +02:00
bitmap_font_2048_0_img.c Fixed display of 'b' letter in OpenGL canvas. 2016-05-27 14:44:44 +02:00
bitmap_font_2048_desc.c Fixed display of 'b' letter in OpenGL canvas. 2016-05-27 14:44:44 +02:00
bitmap_font_desc.c Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
bitmap_font_img.c Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
fnt2struct.py Initial support for bitmap fonts (OpenGL GAL). 2016-05-02 16:04:45 +02:00
fnt2struct_2.py Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
font1024.bmfc Increased interglyph spacing to avoid artifacts when mipmapping is enabled. 2016-05-02 16:14:26 +02:00
font2048.bmfc Fixed display of 'b' letter in OpenGL canvas. 2016-05-27 14:44:44 +02:00
hiero_desc.c Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
hiero_img.c Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00
png2struct.py Multichannel Signed Distance Field text rendering for OpenGL GAL 2016-09-14 10:00:49 +02:00

README

Creating bitmap fonts for GAL
=============================
Maciej Suminski <maciej.suminski@cern.ch>
12.04.2016

To create a new bitmap font atlas for Graphics Abstraction Layer, follow these steps:

 * Download Bitmap Font Generator [1] (runs well under wine)
 * Load default configuration stored in font.bmfc
 * Adjust settings as needed
 * Be sure that all glyphs fit into one page (you can check if in 'Visualize' you can move to another page (menu View))
 * Export font atlas as .PNG file, and font description as XML file
 * Run ./fnt2struct.py bitmap_font.fnt
 * Run ./png2struct.py bitmap_font_0.png
 * Copy bitmap_font_desc.c to common/gal/opengl/bitmap_font_desc.c
 * Copy bitmap_font_0.png to common/gal/opengl/bitmap_font_img.c

Recommended export options:
    Texture size: 1024x1024 or 2048x2048 (should be supported by majority GPUs)
    Bit depth: 8
    Font descriptor: XML
    Textures: png
    Layout spacing: 2 (both horizontal and vertical)

To match as closely as possible the newstroke_font glyph set,
mark the following character subsets in Bitmap Font Generator right panel:
    Latin + Latin Supplement
    Latin Extended A
    Latin Extended B
    IPA Extensions
    Greek and Coptic
    Cyrillic
    Latin Extended Additional
    Greek Extended
    General Punctuation
    Subscripts and Superscripts
    Currency Symbols
    Number Forms
    Mathematical Operators
    Geometric Shapes

References:
    1. http://www.angelcode.com/products/bmfont/