Bump dependencies
This commit is contained in:
parent
e77d935014
commit
f9feea3f29
755
Cargo.lock
generated
755
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -23,18 +23,18 @@ doc = false
|
||||
typst = { path = "../typst" }
|
||||
typst-library = { path = "../typst-library" }
|
||||
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std"] }
|
||||
clap = { version = "4.2.4", features = ["derive", "env"] }
|
||||
clap = { version = "4.4", features = ["derive", "env"] }
|
||||
codespan-reporting = "0.11"
|
||||
comemo = "0.3"
|
||||
ecow = "0.1.1"
|
||||
dirs = "5"
|
||||
flate2 = "1"
|
||||
inferno = "0.11.15"
|
||||
memmap2 = "0.5"
|
||||
notify = "5"
|
||||
memmap2 = "0.7"
|
||||
notify = "6"
|
||||
once_cell = "1"
|
||||
open = "4.0.2"
|
||||
pathdiff = "0.1"
|
||||
open = "5"
|
||||
pathdiff = "0.2"
|
||||
same-file = "1"
|
||||
# https://github.com/mitsuhiko/self-replace/pull/16
|
||||
self-replace = { git = "https://github.com/typst/self-replace", optional = true }
|
||||
@ -58,10 +58,10 @@ xz2 = { version = "0.1", optional = true }
|
||||
zip = { version = "0.6", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
semver = "1"
|
||||
clap = { version = "4.2.4", features = ["derive", "string"] }
|
||||
clap = { version = "4.4", features = ["derive", "string"] }
|
||||
clap_complete = "4.2.1"
|
||||
clap_mangen = "0.2.10"
|
||||
semver = "1"
|
||||
|
||||
[features]
|
||||
default = ["embed-fonts"]
|
||||
|
@ -271,7 +271,7 @@ impl<'a> codespan_reporting::files::Files<'a> for SystemWorld {
|
||||
// Try to express the path relative to the working directory.
|
||||
vpath
|
||||
.resolve(self.root())
|
||||
.and_then(|abs| pathdiff::diff_paths(&abs, self.workdir()))
|
||||
.and_then(|abs| pathdiff::diff_paths(abs, self.workdir()))
|
||||
.as_deref()
|
||||
.unwrap_or_else(|| vpath.as_rootless_path())
|
||||
.to_string_lossy()
|
||||
|
@ -20,7 +20,7 @@ include_dir = "0.7"
|
||||
once_cell = "1"
|
||||
pulldown-cmark = "0.9"
|
||||
serde = { version = "1.0.184", features = ["derive"] }
|
||||
serde_yaml = "0.8"
|
||||
serde_yaml = "0.9"
|
||||
syntect = { version = "5", default-features = false, features = ["parsing", "html", "regex-fancy"] }
|
||||
typed-arena = "2"
|
||||
unicode_names2 = "0.6.0"
|
||||
|
@ -38,13 +38,13 @@ ciborium = "0.2.1"
|
||||
roxmltree = "0.18"
|
||||
rustybuzz = "0.7"
|
||||
serde_json = "1"
|
||||
serde_yaml = "0.8"
|
||||
serde_yaml = "0.9"
|
||||
smallvec = "1.10"
|
||||
syntect = { version = "5", default-features = false, features = ["parsing", "regex-fancy", "plist-load", "yaml-load"] }
|
||||
time = { version = "0.3.20", features = ["formatting"] }
|
||||
toml = { version = "0.7.4"}
|
||||
toml = { version = "0.8" }
|
||||
tracing = "0.1.37"
|
||||
ttf-parser = "0.18.1"
|
||||
ttf-parser = "0.19.2"
|
||||
typed-arena = "2"
|
||||
unicode-bidi = "0.3.13"
|
||||
unicode-math-class = "0.1"
|
||||
|
@ -472,7 +472,7 @@ impl<'a> GlyphwiseSubsts<'a> {
|
||||
pub fn new(gsub: LayoutTable<'a>, feature: Feature) -> Option<Self> {
|
||||
let table = gsub
|
||||
.features
|
||||
.find(feature.tag)
|
||||
.find(ttf_parser::Tag(feature.tag.0))
|
||||
.and_then(|feature| feature.lookup_indices.get(0))
|
||||
.and_then(|index| gsub.lookups.get(index))?;
|
||||
let table = table.subtables.get::<SubstitutionSubtable>(0)?;
|
||||
|
@ -24,16 +24,16 @@ bytemuck = "1"
|
||||
comemo = "0.3"
|
||||
ecow = { version = "0.1.2", features = ["serde"] }
|
||||
flate2 = "1"
|
||||
fontdb = "0.13"
|
||||
fontdb = { version = "0.13", default-features = false }
|
||||
if_chain = "1"
|
||||
image = { version = "0.24", default-features = false, features = ["png", "jpeg", "gif"] }
|
||||
indexmap = { version = "1.9.3", features = ["serde"] }
|
||||
indexmap = { version = "2", features = ["serde"] }
|
||||
log = "0.4"
|
||||
miniz_oxide = "0.7"
|
||||
oklab = "1"
|
||||
once_cell = "1"
|
||||
pdf-writer = "0.8.1"
|
||||
pixglyph = "0.1"
|
||||
pixglyph = "0.2"
|
||||
regex = "1"
|
||||
resvg = { version = "0.32", default-features = false, features = ["raster-images"] }
|
||||
roxmltree = "0.18"
|
||||
@ -43,10 +43,10 @@ siphasher = "0.3"
|
||||
subsetter = "0.1.1"
|
||||
svg2pdf = "0.6"
|
||||
tiny-skia = "0.9.0"
|
||||
toml = { version = "0.7.4", default-features = false, features = ["parse"] }
|
||||
toml = { version = "0.8", default-features = false, features = ["parse"] }
|
||||
tracing = "0.1.37"
|
||||
ttf-parser = "0.18.1"
|
||||
unicode-general-category = "0.6"
|
||||
ttf-parser = "0.19.2"
|
||||
unicode-properties = "0.1"
|
||||
unicode-ident = "1.0"
|
||||
unicode-math-class = "0.1"
|
||||
unicode-segmentation = "1"
|
||||
@ -55,7 +55,7 @@ usvg = { version = "0.32", default-features = false, features = ["text"] }
|
||||
xmlwriter = "0.1.0"
|
||||
xmp-writer = "0.1"
|
||||
time = { version = "0.3.20", features = ["std", "formatting", "macros"] }
|
||||
wasmi = "0.30.0"
|
||||
wasmi = "0.31.0"
|
||||
xmlparser = "0.13.5"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
|
@ -4,7 +4,7 @@ use ecow::{eco_format, EcoString};
|
||||
use pdf_writer::types::{CidFontType, FontFlags, SystemInfo, UnicodeCmap};
|
||||
use pdf_writer::{Filter, Finish, Name, Rect, Str};
|
||||
use ttf_parser::{name_id, GlyphId, Tag};
|
||||
use unicode_general_category::GeneralCategory;
|
||||
use unicode_properties::{GeneralCategory, UnicodeGeneralCategory};
|
||||
|
||||
use super::{deflate, EmExt, PdfContext, RefExt};
|
||||
use crate::eval::Bytes;
|
||||
@ -215,9 +215,7 @@ fn create_cmap(
|
||||
|
||||
subtable.codepoints(|n| {
|
||||
let Some(c) = std::char::from_u32(n) else { return };
|
||||
if unicode_general_category::get_general_category(c)
|
||||
== GeneralCategory::PrivateUse
|
||||
{
|
||||
if c.general_category() == GeneralCategory::PrivateUse {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ use crate::geom::{
|
||||
self, Abs, Color, FixedStroke, Geometry, LineCap, LineJoin, Paint, PathItem, Shape,
|
||||
Size, Transform,
|
||||
};
|
||||
use crate::image::{DecodedImage, Image};
|
||||
use crate::image::{DecodedImage, Image, RasterFormat};
|
||||
|
||||
/// Export a frame into a raster image.
|
||||
///
|
||||
@ -296,7 +296,10 @@ fn render_bitmap_glyph(
|
||||
let size = text.size.to_f32();
|
||||
let ppem = size * ts.sy;
|
||||
let raster = text.font.ttf().glyph_raster_image(id, ppem as u16)?;
|
||||
let image = Image::new(raster.data.into(), raster.format.into(), None).ok()?;
|
||||
if raster.format != ttf_parser::RasterImageFormat::PNG {
|
||||
return None;
|
||||
}
|
||||
let image = Image::new(raster.data.into(), RasterFormat::Png.into(), None).ok()?;
|
||||
|
||||
// FIXME: Vertical alignment isn't quite right for Apple Color Emoji,
|
||||
// and maybe also for Noto Color Emoji. And: Is the size calculation
|
||||
|
@ -420,9 +420,12 @@ fn convert_outline_glyph_to_path(font: &Font, id: GlyphId) -> Option<EcoString>
|
||||
/// Convert a bitmap glyph to an encoded image URL.
|
||||
#[comemo::memoize]
|
||||
fn convert_bitmap_glyph_to_image(font: &Font, id: GlyphId) -> Option<(Image, f64, f64)> {
|
||||
let bitmap = font.ttf().glyph_raster_image(id, std::u16::MAX)?;
|
||||
let image = Image::new(bitmap.data.into(), bitmap.format.into(), None).ok()?;
|
||||
Some((image, bitmap.x as f64, bitmap.y as f64))
|
||||
let raster = font.ttf().glyph_raster_image(id, std::u16::MAX)?;
|
||||
if raster.format != ttf_parser::RasterImageFormat::PNG {
|
||||
return None;
|
||||
}
|
||||
let image = Image::new(raster.data.into(), RasterFormat::Png.into(), None).ok()?;
|
||||
Some((image, raster.x as f64, raster.y as f64))
|
||||
}
|
||||
|
||||
/// Convert an SVG glyph to an encoded image URL.
|
||||
|
@ -158,6 +158,18 @@ pub enum ImageFormat {
|
||||
Vector(VectorFormat),
|
||||
}
|
||||
|
||||
impl From<RasterFormat> for ImageFormat {
|
||||
fn from(format: RasterFormat) -> Self {
|
||||
Self::Raster(format)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<VectorFormat> for ImageFormat {
|
||||
fn from(format: VectorFormat) -> Self {
|
||||
Self::Vector(format)
|
||||
}
|
||||
}
|
||||
|
||||
cast! {
|
||||
ImageFormat,
|
||||
self => match self {
|
||||
@ -216,20 +228,6 @@ impl TryFrom<image::ImageFormat> for RasterFormat {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ttf_parser::RasterImageFormat> for RasterFormat {
|
||||
fn from(format: ttf_parser::RasterImageFormat) -> Self {
|
||||
match format {
|
||||
ttf_parser::RasterImageFormat::PNG => RasterFormat::Png,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ttf_parser::RasterImageFormat> for ImageFormat {
|
||||
fn from(format: ttf_parser::RasterImageFormat) -> Self {
|
||||
Self::Raster(format.into())
|
||||
}
|
||||
}
|
||||
|
||||
/// A decoded image.
|
||||
pub enum DecodedImage {
|
||||
/// A decoded pixel raster with its ICC profile.
|
||||
|
@ -9,17 +9,17 @@ publish = false
|
||||
[dev-dependencies]
|
||||
typst = { path = "../crates/typst" }
|
||||
typst-library = { path = "../crates/typst-library" }
|
||||
clap = { version = "4.4", features = ["derive"] }
|
||||
comemo = "0.3"
|
||||
ecow = { version = "0.1.2", features = ["serde"] }
|
||||
iai = { git = "https://github.com/reknih/iai" }
|
||||
iai = { git = "https://github.com/typst/iai" }
|
||||
once_cell = "1"
|
||||
oxipng = { git = "https://github.com/laurmaedje/oxipng", rev = "b8ec65b", default-features = false, features = ["filetime", "parallel", "zopfli"] }
|
||||
oxipng = { git = "https://github.com/typst/oxipng", rev = "b8ec65b", default-features = false, features = ["filetime", "parallel", "zopfli"] }
|
||||
rayon = "1.7.0"
|
||||
tiny-skia = "0.9.0"
|
||||
ttf-parser = "0.18.1"
|
||||
ttf-parser = "0.19.2"
|
||||
unscanny = "0.1"
|
||||
walkdir = "2"
|
||||
clap = { version = "4.2.4", features = ["derive"] }
|
||||
|
||||
[[test]]
|
||||
name = "tests"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
@ -98,7 +98,7 @@
|
||||
#test(data.at("1"), "ok")
|
||||
|
||||
---
|
||||
// Error: 7-24 failed to parse YAML (while parsing a flow sequence, expected ',' or ']' at line 2 column 1)
|
||||
// Error: 7-24 failed to parse YAML (did not find expected ',' or ']' at line 2 column 1, while parsing a flow sequence at line 1 column 18)
|
||||
#yaml("/files/bad.yaml")
|
||||
|
||||
---
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
---
|
||||
#set text(lang: "zh", font: ("Linux Libertine", "Noto Serif CJK SC"))
|
||||
#for i in range(9,21, step: 2){
|
||||
#for i in range(9, 21, step: 2){
|
||||
numbering("一", i)
|
||||
[ and ]
|
||||
numbering("壹", i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user