From 662fca6e9780e500cec09d2302ffd4b97de2e183 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 12 Oct 2026 17:35:13 -0400 Subject: [PATCH] Text: note that the 1.2 line pitch was measured on one Windows install Co-Authored-By: Claude Opus 5.5 (1M context) --- crates/text/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/text/src/lib.rs b/crates/text/src/lib.rs index 90b9d8e..5eeb40c 100644 --- a/crates/text/src/lib.rs +++ b/crates/text/src/lib.rs @@ -705,6 +705,10 @@ fn measure_str(face: &FontFace, size: f64, s: &str) -> (f64, Vec<(u32, f64)>) { /// Single line spacing as a multiple of the font size. PowerPoint spaces single-spaced lines 1.2 /// times the size apart in every font (observed on twenty Latin, CJK, Thai and Indic fonts at 18 /// and 40 pt), whatever the font's own ascent and descent. +/// +/// Caveat: this was measured on one Windows install of desktop PowerPoint. It may be a Windows or +/// machine setting; PowerPoint on macOS or the web may space lines by the font's own metrics. +/// Keep it a single tunable value, and re-measure on the other platform before changing it. const LINE_PITCH: f64 = 1.2; /// A line's height above and below the baseline at `size`: [`LINE_PITCH`] × size, split where