Embed a single monospace face to shrink PDFs
This commit is contained in:
1 parent
2076da8f21
commit
ea14b3edbf
5 files changed
+41
-5
No files matched your search
Vendored
+10
@@ -115,6 +115,16 @@ impl FontCache {
|
||||
}
|
||||
|
||||
/// Adds the given font family to the cache and returns a reference to it.
|
||||
pub fn add_font_family_single(&mut self, family: FontFamily<FontData>) -> FontFamily<Font> {
|
||||
let font = self.add_font(family.regular);
|
||||
FontFamily {
|
||||
regular: font,
|
||||
bold: font,
|
||||
italic: font,
|
||||
bold_italic: font,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_font_family(&mut self, family: FontFamily<FontData>) -> FontFamily<Font> {
|
||||
FontFamily {
|
||||
regular: self.add_font(family.regular),
|
||||
|
||||
Reference in new issue
Block a user