diff options
Diffstat (limited to 'tests/src')
| -rw-r--r-- | tests/src/render.py | 5 | ||||
| -rw-r--r-- | tests/src/typeset.rs | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/src/render.py b/tests/src/render.py index 3b6c96f8..80f165a1 100644 --- a/tests/src/render.py +++ b/tests/src/render.py @@ -170,8 +170,9 @@ class BoxRenderer: return self.img -def pix(points): - return int(4 * points) +# the number of pixels per raw unit +def pix(raw): + return int(4 * raw) def overlap(a, b): return (a[0] < b[2] and b[0] < a[2]) and (a[1] < b[3] and b[1] < a[3]) diff --git a/tests/src/typeset.rs b/tests/src/typeset.rs index af73bd02..ccce8820 100644 --- a/tests/src/typeset.rs +++ b/tests/src/typeset.rs @@ -14,8 +14,9 @@ use futures_executor::block_on; use typstc::Typesetter; use typstc::font::DynProvider; +use typstc::geom::{Size, Value4}; use typstc::layout::MultiLayout; -use typstc::length::{Length, Size, Value4}; +use typstc::length::Length; use typstc::style::PageStyle; use typstc::paper::PaperClass; use typstc::export::pdf; @@ -85,7 +86,7 @@ fn test(name: &str, src: &str, index: &FsIndex) -> DynResult<()> { typesetter.set_page_style(PageStyle { class: PaperClass::Custom, - dimensions: Size::with_all(Length::pt(250.0)), + dimensions: Size::with_all(Length::pt(250.0).as_raw()), margins: Value4::with_all(None), }); |
