tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
Loading...
Searching...
No Matches
TinyTextStyle Struct Reference

How a run of text is set. More...

#include <text.h>

Public Attributes

float size
 Em size in pixels. Ignored by a bitmap face, which has one size.
float tracking
float line_height
uint8_t kerning

Detailed Description

How a run of text is set.

A zeroed structure is usable and means the same as passing NULL: the face's own em size, no tracking, single line spacing and no kerning. tiny_text_style fills one in with the defaults instead, which differ in one place – kerning on – and are what a caller should start from.

Member Data Documentation

◆ kerning

uint8_t TinyTextStyle::kerning

Non-zero to apply the face's kern pairs.

◆ line_height

float TinyTextStyle::line_height

Multiple of the face's own line height. Zero reads as one.

◆ size

float TinyTextStyle::size

Em size in pixels. Ignored by a bitmap face, which has one size.

Zero means the face's own em, so a zeroed style draws. A negative size is a caller error and reports TINYIMG_ERR_RANGE.

◆ tracking

float TinyTextStyle::tracking

Extra space between glyphs, in pixels. Negative tightens.


The documentation for this struct was generated from the following file: