Write PDF interword spaces with actual device fonts
This commit is contained in:
1 parent
b93d5f55da
commit
514a2d3344
24 files changed
+664
-65
No files matched your search
@@ -25,6 +25,8 @@ pub struct NativeShipout {
|
||||
pub(super) pdf_color_steps: Vec<Option<Arc<PdfColorProgram>>>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub(super) pdf_graphics_steps: Vec<PdfGraphics>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub(super) pdf_text_spaces: Option<crate::pdf_device::text_spaces::SpaceSettings>,
|
||||
#[serde(default, skip_serializing_if = "pdf_resource_entries_empty")]
|
||||
pub(super) pdf_resource_entries: Arc<[u8]>,
|
||||
#[serde(default, skip_serializing_if = "crate::pdf_device::links::PageLinks::is_empty")]
|
||||
@@ -43,6 +45,7 @@ impl NativeShipout {
|
||||
units: crate::render::DisplayUnits::TeX,
|
||||
pdf: self.device.pdf.clone(),
|
||||
pdf_links: self.pdf_links.clone(),
|
||||
pdf_text_spaces: self.pdf_text_spaces.clone(),
|
||||
pdf_resources: crate::pdf_device::page_resources::PageResources {
|
||||
entries: self.pdf_resource_entries.clone(),
|
||||
..Default::default()
|
||||
@@ -74,6 +77,14 @@ impl NativeShipout {
|
||||
}
|
||||
return;
|
||||
}
|
||||
boxes::GeometryItem::PdfTextSpace { x, y, operation } => {
|
||||
page.items.push(DisplayItem::PdfTextSpace {
|
||||
x: self.device.horizontal_origin + x,
|
||||
y: self.device.vertical_origin + self.box_node.height + y,
|
||||
operation,
|
||||
});
|
||||
return;
|
||||
}
|
||||
boxes::GeometryItem::PdfGraphics { x, y } => {
|
||||
if let Some(operation) = graphics_steps.next() {
|
||||
page.items.push(DisplayItem::PdfGraphics {
|
||||
|
||||
Reference in new issue
Block a user