mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Simplify subsetter definition ✨
This commit is contained in:
parent
b24bac7cae
commit
54ace2a7fd
@ -409,12 +409,8 @@ struct Subsetter<'d> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d> Subsetter<'d> {
|
impl<'d> Subsetter<'d> {
|
||||||
fn subset<I1, S1, I2, S2>(mut self, needed_tables: I1, optional_tables: I2)
|
fn subset<I, S>(mut self, needed_tables: I, optional_tables: I) -> FontResult<Font>
|
||||||
-> FontResult<Font>
|
where I: IntoIterator<Item=S>, S: AsRef<str> {
|
||||||
where
|
|
||||||
I1: IntoIterator<Item=S1>, S1: AsRef<str>,
|
|
||||||
I2: IntoIterator<Item=S2>, S2: AsRef<str>
|
|
||||||
{
|
|
||||||
// Find out which glyphs to include based on which characters we want
|
// Find out which glyphs to include based on which characters we want
|
||||||
// and which glyphs are used by composition.
|
// and which glyphs are used by composition.
|
||||||
self.build_glyphs()?;
|
self.build_glyphs()?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user