Expand description
Extends ttf_parser with owned version of
Face
: OwnedFace
.
Re-exports ttf_parser::*
.
§Example
use owned_ttf_parser::{AsFaceRef, Face, OwnedFace};
let owned_face = OwnedFace::from_vec(owned_font_data, 0).unwrap();
let face_ref: &Face<'_> = owned_face.as_face_ref();
assert_eq!(face_ref.ascender(), 2254);
Modules§
- ankr
- An Anchor Point Table implementation.
- apple_
layout - This module contains Apple Advanced Typography Layout supplementary tables implementation.
- avar
- An Axis Variations Table implementation.
- cbdt
- A Color Bitmap Data Table implementation.
- cblc
- A Color Bitmap Location Table implementation.
- cff
- A Compact Font Format Table implementation.
- cff2
- A Compact Font Format 2 Table implementation.
- cmap
- A Character to Glyph Index Mapping Table implementation.
- colr
- A Color Table implementation.
- cpal
- A Color Palette Table implementation.
- feat
- A Feature Name Table implementation.
- fvar
- A Font Variations Table implementation.
- gdef
- A Glyph Definition Table implementation.
- glyf
- A Glyph Data Table implementation.
- gpos
- A Glyph Positioning Table implementation.
- gsub
- A Glyph Substitution Table implementation.
- gvar
- A Glyph Variations Table implementation.
- head
- A Font Header Table implementation.
- hhea
- A Horizontal Header Table implementation.
- hmtx
- A Horizontal/Vertical Metrics Table implementation.
- hvar
- A Horizontal Metrics Variations Table implementation.
- kern
- A Kerning Table implementation.
- kerx
- An Extended Kerning Table implementation.
- loca
- An Index to Location Table implementation.
- math
- A Math Table implementation.
- maxp
- A Maximum Profile Table implementation.
- morx
- An Extended Glyph Metamorphosis Table implementation.
- mvar
- A Metrics Variations Table implementation.
- name
- A Naming Table implementation.
- name_id
- A list of name ID’s.
- opentype_
layout - This module contains OpenType Layout supplementary tables implementation.
- os2
- A OS/2 and Windows Metrics Table implementation.
- post
- A PostScript Table implementation.
- sbix
- A Standard Bitmap Graphics Table implementation.
- stat
- A Style Attributes Table implementation.
- svg
- An SVG Table implementation.
- trak
- A Tracking Table implementation.
- vhea
- A Vertical Header Table implementation.
- vorg
- A Vertical Origin Table implementation.
- vvar
- A Vertical Metrics Variations Table implementation.
Structs§
- Face
- A font face.
- Face
Tables - Parsed face tables.
- Fixed
- A 32-bit signed fixed-point number (16.16).
- GlyphId
- A type-safe wrapper for glyph ID.
- Lazy
Array16 - A slice-like container that converts internal binary data only on access.
- Lazy
Array32 - A slice-like container that converts internal binary data only on access.
- Lazy
Array Iter16 - An iterator over
LazyArray16
. - Lazy
Array Iter32 - An iterator over
LazyArray32
. - Line
Metrics - A line metrics.
- Normalized
Coordinate - A variation coordinate in a normalized coordinate system.
- Owned
Face - An owned version of font
Face
. - Phantom
Points - Phantom points.
- PointF
- A float point.
- PreParsed
Subtables - A
Face
with cmap & kern subtables parsed once on initialization. - Raster
Glyph Image - A glyph’s raster image.
- RawFace
- A raw font face.
- RawFace
Tables - A list of all supported tables as raw data.
- Rect
- A rectangle.
- RectF
- A rectangle described by the left-lower and upper-right points.
- Rgba
Color - A RGBA color in the sRGB color space.
- Script
Metrics - A script metrics used by subscript and superscript.
- Table
Record - A raw table record.
- Tag
- A 4-byte tag.
- Transform
- An affine transform.
- Unicode
Ranges - Unicode Ranges.
- Variation
- A font variation value.
- Variation
Axis - A variation axis.
Enums§
- CFFError
- A list of errors that can occur during a CFF glyph outlining.
- Face
Parsing Error - A list of font face parsing errors.
- Language
- A
Name
language. - Permissions
- Face permissions.
- Platform
Id - A platform ID.
- Raster
Image Format - A glyph raster image format.
- Style
- A face style.
- Weight
- A face weight.
- Width
- A face width.
Traits§
- AsFace
Ref - Used to perform a cheap conversion to a
Face
reference. - FaceMut
- Trait exposing mutable operations on a
ttf_parser::Face
. - From
Data - A trait for parsing raw binary data of fixed size.
- Outline
Builder - A trait for glyph outline construction.
Functions§
- fonts_
in_ collection - Returns the number of fonts stored in a TrueType font collection.