documents: export and measuring choose fonts as gpui draws: a missing family falls to sans-serif, then any face
CI / platforms (windows-latest) (push) Failing after 11s
CI / site (push) Successful in 26s
CI / crate (push) Failing after 11m39s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-12 12:23:55 -04:00
1 parent 50a59d2620
commit a0011772ae
2 files changed
+21 -2

No files matched your search

+3 -1
View File
@@ -36,7 +36,9 @@ fn every_glyph_lies_inside_the_picture() {
r"\left(\frac{a}{b}\right)",
] {
let (svg, shape) = svg(&formula(source, false)).expect("typesets");
let tree = usvg::Tree::from_data(svg.as_bytes(), &usvg::Options::default()).expect("svg");
// Measured with the fonts it draws with.
let options = crate::documents::svg_options();
let tree = usvg::Tree::from_data(svg.as_bytes(), &options).expect("svg");
let ink = tree.root().abs_stroke_bounding_box();
let (w, h) = (shape.width.as_f32(), shape.height.as_f32());
let near = |a: f32, b: f32| (a - b).abs() < 0.01;