[][src]Module cat_engine::text

Рендеринг текста. Text rendering. feature = "text_graphics", default_features

Как рендерится символ:

  1. С помощью библиотеки rusttype создаётся символ (или уже даётся готовый)
  2. Этот символ записывается в массив как изображение
  3. Изображение загружается в текстуру
  4. Текстура выводится на экран

How a sign is rendering:

  1. A glyph is built with the rusttype crate (or is given the ready one)
  2. The glyph is written to the array as an image
  3. The image is loaded to the texture
  4. The texture is rendered

Re-exports

pub use rusttype;

Structs

TextBase

Основа для рендеринга текста. A base for text rendering.

Functions

char_height

Возвращает высоту символа. Returns the height of the character.

char_size

Возвращает размер символа. Returns the size of the character.

char_width

Возвращает ширину символа. Returns the width of the character.

load_font

Загружает шрифт. Loads a font.

text_height

Расчитывает высоту текста. Calculates the height of the text.

text_size

Расчитывает и возвращает ширину и высоту текста. Calculates and returns the width and the height of the text.

text_width

Расчитывает ширину текста. Calculates the text width.