Separate format font metrics from live expansion links
This commit is contained in:
1 parent
9b80a782cf
commit
b008c0693a
11 files changed
+389
-84
No files matched your search
@@ -1,7 +1,7 @@
|
||||
//! Per-shipout device state. Original TeX boxes remain unscaled semantic lists.
|
||||
use super::*;
|
||||
use crate::pdf_device::{PdfColorProgram, PdfGraphics};
|
||||
use std::sync::Arc;
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||
pub struct ShipoutDevice {
|
||||
@@ -19,6 +19,8 @@ pub struct ShipoutDevice {
|
||||
pub struct NativeShipout {
|
||||
pub box_node: NativeBox,
|
||||
pub device: ShipoutDevice,
|
||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||
pub(super) font_overrides: BTreeMap<FontId, Arc<crate::native_font::NativeFont>>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub(super) pdf_color_start: Vec<Arc<PdfColorProgram>>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
@@ -136,7 +138,7 @@ impl NativeShipout {
|
||||
x,
|
||||
y,
|
||||
size,
|
||||
font,
|
||||
font: self.font_overrides.get(&font.id).cloned().unwrap_or(font),
|
||||
slot,
|
||||
character,
|
||||
paint: None,
|
||||
|
||||
Reference in new issue
Block a user