top of page

[Discussion] Label Scheme

Classical text rendering: bitmap fonts

Main Idea:taking a bitmap font and sampling the corresponding glyphs(character symbols) from the texture How: 1.Build:Select a font and extract all relevant characters out of this font to paste them all within a single large texture. 2.Use: render this section of the bitmap font to a 2D quad.

Advantage: It is relatively easy to implement and because bitmap fonts are pre-rasterized they're quite efficient.

Disadvantage: 1.Inflexible: hard to use different font. 2.Limited resolution: zooming will quickly show pixelated edges. 3.Limited characters: only a small character set.

Modern text rendering: FreeType

Tackled with

Main Idea: Software development library could load fonts, render them to bitmaps and provide support for several font-related operations.

How: 1.Use TrueType fonts: a collection of character glyphs defined by mathematical equations (combinations of splines). 2. the rasterized font images can be procedurally generated based on the preferred font height you'd like to obtain them in

Advantage:

1. Flexible: easy to set fonts/ size even text resolution.

2. High resolution and have methods to do anti-aliasing

3. Flexible characters: depends on predefined character lists

Disadvantage:

1. Need to find a third-part library

2. Bindings may need depends on the font library.

bottom of page