diff options
Diffstat (limited to 'crates/typst-kit/src')
| -rw-r--r-- | crates/typst-kit/src/fonts.rs | 10 | ||||
| -rw-r--r-- | crates/typst-kit/src/package.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/crates/typst-kit/src/fonts.rs b/crates/typst-kit/src/fonts.rs index 8c8981a1..83e13fd8 100644 --- a/crates/typst-kit/src/fonts.rs +++ b/crates/typst-kit/src/fonts.rs @@ -8,12 +8,12 @@ //! - For math: New Computer Modern Math //! - For code: Deja Vu Sans Mono -use std::path::PathBuf; +use std::fs; +use std::path::{Path, PathBuf}; use std::sync::OnceLock; -use std::{fs, path::Path}; use fontdb::{Database, Source}; -use typst::text::{Font, FontBook, FontInfo}; +use typst_library::text::{Font, FontBook, FontInfo}; use typst_timing::TimingScope; /// Holds details about the location of a font and lazily the font itself. @@ -46,7 +46,7 @@ impl FontSlot { pub fn get(&self) -> Option<Font> { self.font .get_or_init(|| { - let _scope = TimingScope::new("load font", None); + let _scope = TimingScope::new("load font"); let data = fs::read( self.path .as_ref() @@ -196,7 +196,7 @@ impl FontSearcher { #[cfg(feature = "embed-fonts")] fn add_embedded(&mut self) { for data in typst_assets::fonts() { - let buffer = typst::foundations::Bytes::from_static(data); + let buffer = typst_library::foundations::Bytes::from_static(data); for (i, font) in Font::iter(buffer).enumerate() { self.book.push(font.info().clone()); self.fonts.push(FontSlot { diff --git a/crates/typst-kit/src/package.rs b/crates/typst-kit/src/package.rs index 83978010..412c7982 100644 --- a/crates/typst-kit/src/package.rs +++ b/crates/typst-kit/src/package.rs @@ -5,8 +5,8 @@ use std::path::{Path, PathBuf}; use ecow::eco_format; use once_cell::sync::OnceCell; -use typst::diag::{bail, PackageError, PackageResult, StrResult}; -use typst::syntax::package::{ +use typst_library::diag::{bail, PackageError, PackageResult, StrResult}; +use typst_syntax::package::{ PackageInfo, PackageSpec, PackageVersion, VersionlessPackageSpec, }; |
