pub struct CffFont {Show 15 fields
pub name: String,
pub font_matrix: [f64; 6],
pub font_bbox: [f64; 4],
pub char_strings: Vec<Vec<u8>>,
pub charset: Vec<String>,
pub encoding: Vec<u16>,
pub default_width_x: f64,
pub nominal_width_x: f64,
pub local_subrs: Vec<Vec<u8>>,
pub global_subrs: Vec<Vec<u8>>,
pub is_cid: bool,
pub fd_array: Vec<FdEntry>,
pub fd_select: Vec<u8>,
pub ros: Option<(String, String, i32)>,
pub cid_to_gid: Vec<u16>,
}Expand description
A parsed CFF font.
Fields§
§name: StringFont name from Name INDEX.
font_matrix: [f64; 6]Font transformation matrix (default [0.001, 0, 0, 0.001, 0, 0]).
font_bbox: [f64; 4]Font bounding box.
char_strings: Vec<Vec<u8>>GID-indexed raw Type 2 charstring bytes.
charset: Vec<String>GID → glyph name.
encoding: Vec<u16>char_code (0–255) → GID.
default_width_x: f64Default advance width from Private DICT.
nominal_width_x: f64Nominal advance width from Private DICT.
local_subrs: Vec<Vec<u8>>Local subroutines from Private DICT.
global_subrs: Vec<Vec<u8>>Global subroutines (shared across all fonts in FontSet).
is_cid: boolWhether this is a CID-keyed font (ROS operator present).
fd_array: Vec<FdEntry>Per-FD Private dicts + subrs (CID only).
fd_select: Vec<u8>GID → FD index (CID only).
ros: Option<(String, String, i32)>Registry-Ordering-Supplement (CID only).
cid_to_gid: Vec<u16>CID → GID mapping for CID-keyed fonts. In CID fonts, the charset encodes GID → CID; this is the reverse map.
Auto Trait Implementations§
impl Freeze for CffFont
impl RefUnwindSafe for CffFont
impl Send for CffFont
impl Sync for CffFont
impl Unpin for CffFont
impl UnsafeUnpin for CffFont
impl UnwindSafe for CffFont
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more