pub struct TextObject {
pub segments: Box<[TextSegment]>,
pub position: Point,
pub matrix: Affine,
pub font: Option<(Arc<Font>, f32)>,
pub font_source: Option<ObjRef>,
pub render_mode: TextRenderMode,
pub type3_metrics: BTreeMap<u32, Type3Metrics>,
}Expand description
One run of glyphs sharing a position and a font.
Equality compares the font by identity, as TextState does.
Fields§
§segments: Box<[TextSegment]>The character codes, split into runs by the adjustments between them.
position: PointWhere the run starts, in page space.
matrix: AffineThe matrix glyphs are drawn with, translation excluded.
font: Option<(Arc<Font>, f32)>The font and size.
font_source: Option<ObjRef>The /Font resource the font came from, for a regenerated stream to
name. None for a font loaded from an inline dictionary.
render_mode: TextRenderModeHow the glyphs are painted.
type3_metrics: BTreeMap<u32, Type3Metrics>For a Type 3 font only: what each shown character’s glyph procedure declares about itself, keyed by character code.
A Type 3 glyph has no program to measure — its advance and box come
from the d0/d1 operator inside its content stream — so a consumer
that needs either has no way to get them from the font alone. The
interpreter has already opened those streams, so it records the answer
here rather than making every consumer re-interpret them.
Trait Implementations§
Source§impl Clone for TextObject
impl Clone for TextObject
Source§fn clone(&self) -> TextObject
fn clone(&self) -> TextObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more