5.8. fontinfo¶
Copyright @ 2013 Mathias Westerdahl
The font info reads the .fontinfo and creates the layers, effects, and blends
- name = ''
The path of the font file. Relative paths are relative to the .fontinfo file. Supports .ttf files. For a complete list of supported formats, see Freetype2
- size = 32
The size of the font (in pixels)
- leading = 0.0
The leading of the font.
- tracking = 0.0
The tracking of the font.
- dpi = 72
The resolution of the font when being rendered.
- padding = 0
The amount of padding that is inserted between two glyphs when rendered to the bitmap.
- internalpadding = 0, 0
The amount of padding (x, y) that is added internally for a glyph. E.g. making room for manual fixup in a image editing program.
- useadvanceaswidth = 0
For japanese fonts, the space in the glyph is important. Therefore, this flag was introduced to respect the space of a glyph. Set to 1 for Japanese fonts.
- usepairkernings = 1
Enables the collecting of the pair kernings table.
- letters = 20-7e
Specifies what letters should be included in the font. It can hold these formats:
A list of hexadecimal digits. The list is comma separated and can specify ranges with the ‘-‘ character:
letters = 20-7c,7d,7e
A filename. The file contains the actual letters.
- bgcolor = 0, 0, 0
The background color of the texture
- fgcolor = 1, 1, 1
The color of the glyph
- antialias = normal
Enables antialiasing for the glyph rendering (the first pass). Possible values are ‘none’, ‘light’ and ‘normal’.
- texturerender = fonttex_bitmap
A path to the module that renders the glyphs to the texture. Must implement a image = render(info) function. The default is fonttex_bitmap
- texturewriter = fonttexout_pil
A path to the module that writes the texture to disc. Must implement a write(options, info, image) function. The default is fonttexout_pil
- writer = fontout_json
A path to the module that writes the glyph info. Must implement a write(options, info, pairkernings) function. The default is fontout_json
- layers = ''
A list of layers (fonteffects.Layer) that will be applied in order.
- effects = ''
A list of post effects that will be applied in order, after the layers have been rendered.