Select named XeTeX faces by optical size
This commit is contained in:
1 parent
115e1f0fe0
commit
d4e78bc29a
9 files changed
+290
-31
No files matched your search
+10
-1
@@ -1685,7 +1685,16 @@ impl SourceProvider for Files {
|
||||
style: texrra_tex_core::resources::FontStyle,
|
||||
from: &str,
|
||||
) -> Result<Option<texrra_tex_core::resources::NamedFont>, String> {
|
||||
let selected = self.world.read_named_font(name, style, Path::new(from))?;
|
||||
self.named_font_with_size(name, style, None, from)
|
||||
}
|
||||
fn named_font_with_size(
|
||||
&mut self,
|
||||
name: &str,
|
||||
style: texrra_tex_core::resources::FontStyle,
|
||||
optical_points: Option<f64>,
|
||||
from: &str,
|
||||
) -> Result<Option<texrra_tex_core::resources::NamedFont>, String> {
|
||||
let selected = self.world.read_named_font_with_size(name, style, optical_points, Path::new(from))?;
|
||||
if let Some(font) = &selected {
|
||||
let kind = match font.resource.version.path.extension().and_then(|ext| ext.to_str()) {
|
||||
Some(ext) if ext.eq_ignore_ascii_case("ttf") || ext.eq_ignore_ascii_case("ttc") => ResourceKind::TrueType,
|
||||
|
||||
Reference in new issue
Block a user