pub struct CidCffPdfFont {Show 14 fields
pub font: CffFont,
pub default_width: f64,
pub cid_widths: HashMap<u16, f64>,
pub cmap: Option<HashMap<u32, u16>>,
pub pdf_cid_to_gid: Option<Vec<u16>>,
pub identity_cid_to_gid: bool,
pub ordering: Vec<u8>,
pub font_matrix: Matrix,
pub code_lengths: [u8; 256],
pub code_to_cid: HashMap<u32, u32>,
pub wmode: u8,
pub dw2: [f64; 2],
pub w2: HashMap<u16, [f64; 3]>,
pub type1_paths: Option<HashMap<u16, PsPath>>,
}Expand description
CIDFontType0: CFF outlines accessed by CID (2-byte char codes).
Fields§
§font: CffFont§default_width: f64Default glyph width (from /DW, in text space ÷1000).
cid_widths: HashMap<u16, f64>CID → width mapping (from /W array, in text space ÷1000).
cmap: Option<HashMap<u32, u16>>Optional Unicode→GID cmap (from OpenType substitute fonts). When present, used for UCS2 glyph lookup instead of CFF’s CID mapping.
pdf_cid_to_gid: Option<Vec<u16>>CID → GID mapping from the PDF’s /CIDToGIDMap stream. Used for embedded OpenType/CFF fonts stored as FontFile2.
identity_cid_to_gid: boolWhen true, CID maps directly to charstring index (GID = CID). Set when CIDToGIDMap is /Identity or absent in CIDFontType2 fonts.
ordering: Vec<u8>CIDSystemInfo ordering for Unicode→CID width lookup.
font_matrix: Matrix§code_lengths: [u8; 256]First-byte → code length table from the encoding CMap’s codespace ranges.
code_to_cid: HashMap<u32, u32>Code → CID mapping from the encoding CMap (empty = identity).
wmode: u8Writing mode: 0 = horizontal, 1 = vertical.
dw2: [f64; 2]Default vertical metrics [v_y, w1] from /DW2 (default: [880, -1000]).
w2: HashMap<u16, [f64; 3]>Per-CID vertical metrics from /W2: CID → (w1, v_x, v_y).
type1_paths: Option<HashMap<u16, PsPath>>Pre-computed glyph paths for Type 1 fonts used as CIDFontType0. When set, glyph_path_cid uses this cache instead of CFF charstrings.
Auto Trait Implementations§
impl Freeze for CidCffPdfFont
impl RefUnwindSafe for CidCffPdfFont
impl Send for CidCffPdfFont
impl Sync for CidCffPdfFont
impl Unpin for CidCffPdfFont
impl UnsafeUnpin for CidCffPdfFont
impl UnwindSafe for CidCffPdfFont
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more