Retain XeTeX image lookup paths in native formats
This commit is contained in:
1 parent
6a118d3b60
commit
c2e1e64a60
10 files changed
+208
-54
No files matched your search
@@ -124,6 +124,18 @@ impl SourceProvider for RecordingHost<'_> {
|
||||
result.as_ref().map(|resource| resource.version.clone()).map_err(Clone::clone)
|
||||
})
|
||||
}
|
||||
fn resource_with_lookup_path(
|
||||
&mut self,
|
||||
kind: ResourceKind,
|
||||
name: &str,
|
||||
from: &str,
|
||||
) -> Result<(LoadedResource, PathBuf), String> {
|
||||
let (name, from) = (name.to_owned(), from.to_owned());
|
||||
call!(self, resource_with_lookup_path(kind, &name, &from); |result| {
|
||||
result.as_ref().map(|(resource, path)| (resource.version.clone(), path.clone()))
|
||||
.map_err(Clone::clone)
|
||||
})
|
||||
}
|
||||
fn virtual_font(&mut self, name: &str, from: &str) -> Result<Option<LoadedResource>, String> {
|
||||
let (name, from) = (name.to_owned(), from.to_owned());
|
||||
call!(self, virtual_font(&name, &from); |result| {
|
||||
|
||||
@@ -1641,6 +1641,16 @@ impl SourceProvider for Files {
|
||||
self.observe_resource(kind, &resource);
|
||||
Ok(resource)
|
||||
}
|
||||
fn resource_with_lookup_path(
|
||||
&mut self,
|
||||
kind: ResourceKind,
|
||||
name: &str,
|
||||
from: &str,
|
||||
) -> Result<(LoadedResource, PathBuf), String> {
|
||||
let (resource, path) = self.world.read_with_lookup_path(kind, name, Path::new(from))?;
|
||||
self.observe_resource(kind, &resource);
|
||||
Ok((resource, path))
|
||||
}
|
||||
fn virtual_font(&mut self, name: &str, from: &str) -> Result<Option<LoadedResource>, String> {
|
||||
let resource = self
|
||||
.world
|
||||
|
||||
Reference in new issue
Block a user