[][src]Crate fit_text

This crate provides an implementation for calculating the positions of text fragments to fit text withing a rectangle.

The graphics feature, which is on by default, allows the direct rendering of a fitted text with the piston2d-graphics crate.

Modules

color

Defines serveral color constants

Structs

BasicGlyphs

A basic implementor for CharacterWidthCache

Scribe

A struct for writing text into multiple rectangles

TextFormat

A format for some text

Enums

Indent

A way of indenting a line

Resize

A way of resizing text in a rectangle

Traits

CharacterWidthCache

Defines behavior of a cache of character widths.

Functions

fitted_colored_text

Draw justified, colored text fragments to something using the piston2d-graphics crate

fitted_text

Draw justified text to something using the piston2d-graphics crate

Type Definitions

PositionedLines

Lines that have starting positions

PositionedLinesMeta

Lines with metadata that have starting positions

PositionedList

A list of positioned objects