User Tools

Site Tools


IGDE Font Editor

The font editor allows to edit font resources (*.defont depending on the font modules present) for your game. Fonts describe a fixed size bitmap font. Fonts define a set of glyphs each marking a rectangular area on the image to belong to the glyph. Glyphs are identified using unicode. The range of unicode values used is not required to be continuous. Not defined glyphs use a default empty glyph of 0 width.

Font editor preview

The editor window composes of the preview area and the properties panel on the left side.

Preview Window

The preview window shows the font image. The selected glyph is highlighted using a red rectangle. There is no direct editing possible in this view.

Font Generation

Fonts can be generated using the Font → Generate menu entry. This shows a dialog to select the font to use. All supported characters in the font will be added to a newly generated image. All glyphs in the image are separated by a 1 pixel broad gap to ensure best rendering result. An additional enlarge value can be specified. Using enlarging the glyphs obtain an additional spacing which is part of the glyph in contrary to the 1 pixel broad gap. Enalrging is useful to post-process the image in paint applications for example to add outline to glyphs or drop shadows.


Font panel

Defines the font properties.

The Image parameter defines the image to use for the font. The image is required to have an alpha channel to be properly rendered.

The Line Height parameter defines the height of text lines in pixels. When using fonts in Canvas Text and other places the font size defines the text height in pixels to use. Using the same font size as the line height parameter uses obtains a pixel perfect rendering. Using larger or smaller font size scales the font. Using this kind of scaling is usually visually inferior to using the same value.

The Color Font parameter defines if the font is a color font or a tintable font. Color fonts are rendered as-is while tintable fonts use the font colored set while rendering. For this to work tintable fonts have to be white text on black ground. Tintable fonts are the default.


Glyph panel

Defines the glyph parameters. Glyphs are identified by unicode. Glyphs occupy a rectangular area in the image.

The Texture Coords parameter defines the top-left texture coordinate of the rectangular area in pixels. The top-left corner of the image is the coordinate (0,0).

The Width parameter defines the width of the rectangular area. The height of the rectangular area is defined by the Line Height parameter in the font panel.

The Bearing parameter defines the offset in pixels used while rendering the glyph compared to the current render position. A bearing of -2 for example renders the glyph 2 pixels shifted to the left side of the current render position. Bearings are typically used for slanted glyphs since they typically slide underneath the previous glyph.

The Advance parameter defines the count of pixels to advance the render position if the glyph is drawn. Regular fonts tend to have the same advance as their width is. Slanted glyphs are an example of advance being smaller than the width since they overlap the previous and next glyph.

You could leave a comment if you were logged in.
gamedev/deigde/editors/font.txt · Last modified: 2020/04/05 00:26 by dragonlord