Honor pdfTeX character program tags and qualify PLOS ONE
This commit is contained in:
1 parent
84ad682939
commit
a1585339b9
21 files changed
+308
-28
No files matched your search
@@ -1,9 +1,9 @@
|
||||
//! Streaming TFM cursor/ligature-stack execution. A raw input character is
|
||||
//! fetched only after the pending cursor asks for one; inserted ligatures can
|
||||
//! therefore retain or consume components without inventing source characters.
|
||||
use super::{Span, font_catalog::AutoKern};
|
||||
use super::{Span, font_catalog::{AutoKern, FontProgram}};
|
||||
use crate::provenance::{Derivation, PaintSource};
|
||||
use crate::tfm::{LigKernCommand, TfmMetrics};
|
||||
use crate::tfm::LigKernCommand;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
@@ -109,7 +109,7 @@ impl Machine {
|
||||
/// word. Its cursor shares the actual slots, components, ligature stack
|
||||
/// and boundary packing with normal text execution.
|
||||
pub fn reconstitute(
|
||||
f: &TfmMetrics,
|
||||
f: FontProgram<'_>,
|
||||
hu: &[Option<Component>],
|
||||
mut j: usize,
|
||||
n: usize,
|
||||
@@ -302,7 +302,7 @@ impl Machine {
|
||||
}
|
||||
pub fn feed(
|
||||
&mut self,
|
||||
f: &TfmMetrics,
|
||||
f: FontProgram<'_>,
|
||||
c: Component,
|
||||
cancel_left: bool,
|
||||
auto_kern: Option<AutoKern<'_>>,
|
||||
@@ -341,7 +341,7 @@ impl Machine {
|
||||
}
|
||||
pub fn finish(
|
||||
&mut self,
|
||||
f: &TfmMetrics,
|
||||
f: FontProgram<'_>,
|
||||
right_boundary: bool,
|
||||
auto_kern: Option<AutoKern<'_>>,
|
||||
steps: &mut usize,
|
||||
@@ -374,7 +374,7 @@ impl Machine {
|
||||
out.push(Output::Glyph(glyph));
|
||||
}
|
||||
}
|
||||
fn advance(&mut self, f: &TfmMetrics, out: &mut Vec<Output>) {
|
||||
fn advance(&mut self, f: FontProgram<'_>, out: &mut Vec<Output>) {
|
||||
if let Some(mut right) = self.stack.pop_front() {
|
||||
if right.raw && !f.has_slot(right.glyph.slot) {
|
||||
out.push(Output::Missing(
|
||||
@@ -392,7 +392,7 @@ impl Machine {
|
||||
}
|
||||
fn pump(
|
||||
&mut self,
|
||||
f: &TfmMetrics,
|
||||
f: FontProgram<'_>,
|
||||
ending: bool,
|
||||
auto_kern: Option<AutoKern<'_>>,
|
||||
steps: &mut usize,
|
||||
|
||||
Reference in new issue
Block a user