Skip to main content

CidCffPdfFont

Struct CidCffPdfFont 

Source
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: f64

Default 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: bool

When 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: u8

Writing 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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.