diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-02-26 14:02:18 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-02-26 14:02:18 +0100 |
| commit | 6e9671f149f7e01c948ab4671242b22064bde7fd (patch) | |
| tree | c34629f93af4e35861c12a6b82894496c100c4f9 /src/doc.rs | |
| parent | 95d7edeb8d2d04cccecace939fed9e69707f9645 (diff) | |
Write PDFs with extern fonts 🌏
Diffstat (limited to 'src/doc.rs')
| -rw-r--r-- | src/doc.rs | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -13,15 +13,8 @@ use crate::parsing::{SyntaxTree, Node}; pub struct Document { /// The pages of the document. pub pages: Vec<Page>, -} - -impl Document { - /// Create a new document without content. - pub fn new() -> Document { - Document { - pages: vec![], - } - } + /// The font the document is written in. + pub font: String, } /// A page of a document. @@ -158,6 +151,7 @@ impl<'s> Generator<'s> { Ok(Document { pages: vec![page], + font: "NotoSans-Regular".to_owned(), }) } @@ -195,6 +189,7 @@ mod generator_tests { ] } ], + font: "NotoSans-Regular".to_owned(), }); } } |
