summaryrefslogtreecommitdiff
path: root/src/doc.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-02-26 14:02:18 +0100
committerLaurenz <laurmaedje@gmail.com>2019-02-26 14:02:18 +0100
commit6e9671f149f7e01c948ab4671242b22064bde7fd (patch)
treec34629f93af4e35861c12a6b82894496c100c4f9 /src/doc.rs
parent95d7edeb8d2d04cccecace939fed9e69707f9645 (diff)
Write PDFs with extern fonts 🌏
Diffstat (limited to 'src/doc.rs')
-rw-r--r--src/doc.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/doc.rs b/src/doc.rs
index 8ba26835..4fe30fc9 100644
--- a/src/doc.rs
+++ b/src/doc.rs
@@ -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(),
});
}
}