Select a native XeTeX compatibility profile and wide spacing codes
This commit is contained in:
1 parent
651fab42f1
commit
752af43f32
19 files changed
+471
-115
No files matched your search
@@ -64,6 +64,15 @@ impl Executor {
|
||||
}
|
||||
}
|
||||
|
||||
fn pdf_output_mode(&mut self) -> i32 {
|
||||
match self.state.input_profile() {
|
||||
// XeTeX always sends shipouts to its device. The native job
|
||||
// renders those operations without a pdfTeX mode register.
|
||||
InputProfile::XeTeX => 1,
|
||||
_ => self.read_parameter(Parameter::Pdfoutput).width(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn validate_pdf_final_state(&mut self) -> Result<(), Error> {
|
||||
if let Some(options) = self.state.pdf_file_options.clone() {
|
||||
self.reads.insert(Dependency::GlyphUnicode);
|
||||
@@ -73,7 +82,7 @@ impl Executor {
|
||||
self.pdf_token_parameter_bytes(TokenParameter::Pdfpagesattr)?;
|
||||
}
|
||||
self.reads.insert(Dependency::PdfFileState);
|
||||
let mode = self.read_parameter(Parameter::Pdfoutput).width();
|
||||
let mode = self.pdf_output_mode();
|
||||
if self.state.output_mode_set != Some(mode) {
|
||||
return self.fail("native pdfoutput cannot change after output has started");
|
||||
}
|
||||
@@ -194,7 +203,7 @@ impl Executor {
|
||||
files: &mut impl SourceProvider,
|
||||
) -> Result<Option<PdfPageData>, Error> {
|
||||
self.reads.insert(Dependency::PdfFileState);
|
||||
let mode = self.read_parameter(Parameter::Pdfoutput).width();
|
||||
let mode = self.pdf_output_mode();
|
||||
if self
|
||||
.state
|
||||
.output_mode_set
|
||||
@@ -262,7 +271,7 @@ impl Executor {
|
||||
}
|
||||
let driver = match self.state.input_profile() {
|
||||
InputProfile::TeX8Bit => PdfDriver::PdfTeX,
|
||||
InputProfile::UnicodeScalar => PdfDriver::Xdv,
|
||||
InputProfile::UnicodeScalar | InputProfile::XeTeX => PdfDriver::Xdv,
|
||||
};
|
||||
Ok(Some(PdfPageData {
|
||||
driver,
|
||||
|
||||
Reference in new issue
Block a user