Crate font_types

Source
Expand description

Common scalar data types used in font files

Macros§

newtype_scalar
An internal macro for implementing the RawType trait.

Structs§

BigEndian
A wrapper around raw big-endian bytes for some type.
BoundingBox
Minimum and maximum extents of a rectangular region.
F2Dot14
16-bit signed fixed point number with 14 bits of fraction.
F4Dot12
16-bit signed fixed point number with 12 bits of fraction.
F6Dot10
16-bit signed fixed point number with 10 bits of fraction.
F26Dot6
32-bit signed fixed point number with 6 bits of fraction.
FWord
16-bit signed quantity in font design units.
Fixed
32-bit signed fixed point number with 16 bits of fraction.
GlyphId
A 32-bit glyph identifier.
GlyphId16
A 16-bit glyph identifier.
Int24
24-bit unsigned integer.
LongDateTime
A simple datetime type.
MajorMinor
A type representing a major, minor version pair.
NameId
Identifier for an informational string (or name).
Nullable
An offset of a given width for which NULL (zero) is a valid value.
Offset16
A16-bit offset to a table.
Offset24
A24-bit offset to a table.
Offset32
A32-bit offset to a table.
Point
Two dimensional point with a generic coordinate type.
Tag
An OpenType tag.
TryFromGlyphIdError
The error type returned when a glyph identifier conversion fails.
UfWord
16-bit unsigned quantity in font design units.
Uint24
24-bit unsigned integer.
Version16Dot16
A legacy 16/16 version encoding Packed 32-bit value with major and minor version numbers.

Enums§

InvalidTag
An error representing an invalid tag.

Constants§

CFF_SFNT_VERSION
The SFNT version for fonts containing CFF outlines.
TRUE_SFNT_VERSION
The SFNT version for legacy Apple fonts containing TrueType outlines.
TTC_HEADER_TAG
The header tag for a font collection file.
TT_SFNT_VERSION
The SFNT version for fonts containing TrueType outlines.

Traits§

Compatible
A trait for determining whether versions are compatible.
FixedSize
A trait for types that have a known, constant size.
Scalar
A trait for font scalars.