summaryrefslogtreecommitdiff
path: root/crates/typst-kit
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-kit')
-rw-r--r--crates/typst-kit/Cargo.toml5
-rw-r--r--crates/typst-kit/src/fonts.rs10
-rw-r--r--crates/typst-kit/src/package.rs4
3 files changed, 10 insertions, 9 deletions
diff --git a/crates/typst-kit/Cargo.toml b/crates/typst-kit/Cargo.toml
index 13d0a34b..266eba0b 100644
--- a/crates/typst-kit/Cargo.toml
+++ b/crates/typst-kit/Cargo.toml
@@ -11,13 +11,14 @@ license = { workspace = true }
readme = { workspace = true }
[dependencies]
-typst = { workspace = true }
typst-assets = { workspace = true, optional = true }
+typst-library = { workspace = true }
+typst-syntax = { workspace = true }
typst-timing = { workspace = true }
typst-utils = { workspace = true }
+dirs = { workspace = true, optional = true }
ecow = { workspace = true }
env_proxy = { workspace = true, optional = true }
-dirs = { workspace = true, optional = true }
flate2 = { workspace = true, optional = true }
fontdb = { workspace = true, optional = true }
native-tls = { workspace = true, optional = true }
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,
};