[][src]Module bear_lib_terminal::terminal::config::font

Module containing font changing tools.

Examples

The following from the official documentation:

font: UbuntuMono-R.ttf, size=12;
0x5E: curcumflex.png;
0xE000: tileset.png, size=16x16, spacing=2x1;

Is equivalent to

use bear_lib_terminal::terminal;
use bear_lib_terminal::terminal::config::font;
use bear_lib_terminal::geometry::Size;
terminal::set(font::true_type(font::Origin::Root, "UbuntuMono-R.ttf", Size::new(0, 12)));
terminal::set(font::bitmap(font::Origin::Offset('^'), "circumflex.png"));
terminal::set(font::bitmap(font::Origin::Offset('\u{E000}'), "tileset.png").size(Size::new(16, 16)).spacing(Size::new(2, 1)));

Structs

Bitmap

A bitmap font override segment repr, constructed with bitmap().

TrueType

A TrueType font override segment repr, constructed with true_type().

Enums

Align

Per-tileset tile alignment.

Origin

The origin for the font (the part before : in the config string).

RasterizationMode

Rasterization mode for TrueType fonts.

ResizeFilter

Resizing filter for bitmaps.

ResizeMode

How to aspect-change when resizing a bitmap.

Functions

bitmap

Construct a bitmap font override segment repr.

true_type

Construct a TrueType font override segment repr.