Compare commits
2 Commits
1b8d1b3a4f
...
2ec73593d5
Author | SHA1 | Date | |
---|---|---|---|
|
2ec73593d5 | ||
|
af564e589f |
2
Cargo.lock
generated
@ -2911,7 +2911,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "typst-dev-assets"
|
||||
version = "0.13.1"
|
||||
source = "git+https://github.com/mkorje/typst-dev-assets?rev=be2b2d0#be2b2d04092af283ee3651721d38041bf8c72d97"
|
||||
source = "git+https://github.com/typst/typst-dev-assets?rev=bfa947f#bfa947f3433d7d13a995168c40ae788a2ebfe648"
|
||||
|
||||
[[package]]
|
||||
name = "typst-docs"
|
||||
|
@ -33,7 +33,7 @@ typst-syntax = { path = "crates/typst-syntax", version = "0.13.1" }
|
||||
typst-timing = { path = "crates/typst-timing", version = "0.13.1" }
|
||||
typst-utils = { path = "crates/typst-utils", version = "0.13.1" }
|
||||
typst-assets = { git = "https://github.com/typst/typst-assets", rev = "c1089b4" }
|
||||
typst-dev-assets = { git = "https://github.com/mkorje/typst-dev-assets", rev = "be2b2d0" }
|
||||
typst-dev-assets = { git = "https://github.com/typst/typst-dev-assets", rev = "bfa947f" }
|
||||
arrayvec = "0.7.4"
|
||||
az = "1.2"
|
||||
base64 = "0.22"
|
||||
|
@ -27,7 +27,10 @@ use typst_library::layout::{
|
||||
use typst_library::math::*;
|
||||
use typst_library::model::ParElem;
|
||||
use typst_library::routines::{Arenas, RealizationKind};
|
||||
use typst_library::text::{LinebreakElem, RawElem, SpaceElem, TextEdgeBounds, TextElem};
|
||||
use typst_library::text::{
|
||||
BottomEdge, BottomEdgeMetric, LinebreakElem, RawElem, SpaceElem, TextEdgeBounds,
|
||||
TextElem, TopEdge, TopEdgeMetric,
|
||||
};
|
||||
use typst_utils::Numeric;
|
||||
use unicode_math_class::MathClass;
|
||||
|
||||
@ -522,8 +525,15 @@ fn layout_realized(
|
||||
} else if let Some(elem) = elem.to_packed::<OvershellElem>() {
|
||||
self::underover::layout_overshell(elem, ctx, styles)?
|
||||
} else {
|
||||
let local = [
|
||||
TextElem::top_edge.set(TopEdge::Metric(TopEdgeMetric::Bounds)),
|
||||
TextElem::bottom_edge.set(BottomEdge::Metric(BottomEdgeMetric::Bounds)),
|
||||
]
|
||||
.map(|p| p.wrap());
|
||||
let styles = if elem.is::<RawElem>() { styles.chain(&local) } else { styles };
|
||||
|
||||
let mut frame = layout_external(elem, ctx, styles)?;
|
||||
if !frame.has_baseline() && !elem.is::<RawElem>() {
|
||||
if !frame.has_baseline() {
|
||||
let font = find_math_font(ctx.engine.world, styles, elem.span())?;
|
||||
let axis = value!(font, styles, axis_height);
|
||||
frame.set_baseline(frame.height() / 2.0 + axis);
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 968 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 877 B After Width: | Height: | Size: 920 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -17,21 +17,6 @@ $ nothing $
|
||||
$ "hi ∅ hey" $
|
||||
$ sum_(i in NN) 1 + i $
|
||||
|
||||
--- math-font-features-switch ---
|
||||
#let scr(it) = text(features: ("ss01",), $cal(it)$)
|
||||
$cal(P)_i != scr(P)_i$, $cal(bold(I))_l != bold(scr(I))_l$
|
||||
$ product.co_(B in scr(B))^(B in scr(bold(B))) cal(B)(X) $
|
||||
|
||||
--- math-font-covers ---
|
||||
#show math.equation: set text(
|
||||
font: (
|
||||
// Ignore that this regex actually misses some of the script glyphs...
|
||||
(name: "XITS Math", covers: regex("[\u{1D49C}-\u{1D503}]")),
|
||||
),
|
||||
features: ("ss01",),
|
||||
)
|
||||
$ cal(P)_i (X) * cal(C)_1 $
|
||||
|
||||
--- math-optical-size-nested-scripts ---
|
||||
// Test transition from script to scriptscript.
|
||||
#[
|
||||
|