summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 1a39a14d..72c7fb51 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -79,6 +79,8 @@ pub fn typeset(ctx: &mut Context, id: SourceId) -> TypResult<Vec<Frame>> {
/// The core context which holds the configuration and stores.
pub struct Context {
+ /// The loader for fonts and files.
+ pub loader: Arc<dyn Loader>,
/// Stores loaded source files.
pub sources: SourceStore,
/// Stores parsed font faces.
@@ -97,6 +99,7 @@ impl Context {
/// Create a new context.
pub fn new(loader: Arc<dyn Loader>, config: Config) -> Self {
Self {
+ loader: Arc::clone(&loader),
sources: SourceStore::new(Arc::clone(&loader)),
fonts: FontStore::new(Arc::clone(&loader)),
images: ImageStore::new(loader),