Sharpen the room's text — integer scale, raised off the AA floor
Browse files at this commitcc021cfb210c01951e8707965edb189fc38f37e5Parent: 9585160- fix
- sharpen the room's text — integer scale, raised off the AA floor
2 changed files +44 -17
- DESIGN.md +5 -3
- crates/app/src/ui/type_scale.rs +39 -14
DESIGN.mdmodified+5 -3
| @@ -76,9 +76,11 @@ Two faces, fixed roles (bundled, no runtime deps): | ||
| 76 | 76 | - **Spline Sans Mono** — everything the film says: timecode, chords, readouts, metadata, |
| 77 | 77 | cue text, the ledger. Mono = data; if a string is *about the footage or a key*, it is mono. |
| 78 | 78 | |
| 79 | -Scale: 13px hero timecode (700, colons in `ink3`) · 10.5px labels/rows (500) · 9.5–10px chords | |
| 80 | -and metadata (500) · 9px section heads (Archivo 700, uppercase, +0.14em letter-spacing, `ink3`). | |
| 81 | -Nothing below 8px. No italics. Tabular figures wherever digits align. | |
| 79 | +Scale: 15px hero timecode (700, colons in `ink3`) · 13px labels/rows (500) · 11–12px chords | |
| 80 | +and metadata (500) · 10px section heads (Archivo 700, uppercase, +0.14em letter-spacing, `ink3`). | |
| 81 | +Nothing below 9px. Every size is a whole pixel (no half-pixel sizes -- they put glyph baselines | |
| 82 | +off the pixel grid and blurred cosmic-text's AA). No italics. Tabular figures wherever digits | |
| 83 | +align. | |
| 82 | 84 | |
| 83 | 85 | ## 4. Ghost grammar — the control language |
| 84 | 86 |
crates/app/src/ui/type_scale.rsmodified+39 -14
| @@ -36,13 +36,21 @@ pub const ARCHIVO: &str = "Archivo"; | ||
| 36 | 36 | pub const SPLINE_SANS_MONO: &str = "Spline Sans Mono"; |
| 37 | 37 | |
| 38 | 38 | /// DESIGN §3's scale, named so a call site reads the role, not a number. |
| 39 | -pub const HERO_TIMECODE_PX: f32 = 13.; | |
| 40 | -pub const LABEL_ROW_PX: f32 = 10.5; | |
| 41 | -pub const CHORD_METADATA_MAX_PX: f32 = 10.; | |
| 42 | -pub const CHORD_METADATA_MIN_PX: f32 = 9.5; | |
| 43 | -pub const SECTION_HEAD_PX: f32 = 9.; | |
| 39 | +/// | |
| 40 | +/// Landed at a conservative +2px bump over the original half-pixel scale | |
| 41 | +/// (13/10.5/10-9.5/9/8 -> 15/13/12-11/10/9), chosen over a fuller | |
| 42 | +/// "readable at arm's length" candidate (18/15/14-13/12/10) to keep the | |
| 43 | +/// fixed-width dock/bench card labels clear of the truncation ladder | |
| 44 | +/// (DESIGN §7). To try the fuller scale, swap these six values for | |
| 45 | +/// 18./15./14./13./12./10. and update `the_scale_matches_design_3` (and | |
| 46 | +/// DESIGN.md §3) to match. | |
| 47 | +pub const HERO_TIMECODE_PX: f32 = 15.; | |
| 48 | +pub const LABEL_ROW_PX: f32 = 13.; | |
| 49 | +pub const CHORD_METADATA_MAX_PX: f32 = 12.; | |
| 50 | +pub const CHORD_METADATA_MIN_PX: f32 = 11.; | |
| 51 | +pub const SECTION_HEAD_PX: f32 = 10.; | |
| 44 | 52 | /// The floor DESIGN §3 sets: nothing in the room reads smaller than this. |
| 45 | -pub const FLOOR_PX: f32 = 8.; | |
| 53 | +pub const FLOOR_PX: f32 = 9.; | |
| 46 | 54 | |
| 47 | 55 | /// A family, weight and size together -- what a call site needs to paint |
| 48 | 56 | /// text with `.font(style.font).text_size(style.size)`, and nothing it has |
| @@ -173,15 +181,32 @@ mod tests { | ||
| 173 | 181 | use gpui::FontStyle; |
| 174 | 182 | |
| 175 | 183 | /// The scale never drifts below DESIGN §3's floor, and role sizes match |
| 176 | - /// the numbers §3 names -- a call site changing `13.` to `12.` for the | |
| 184 | + /// the numbers §3 names -- a call site changing `15.` to `14.` for the | |
| 177 | 185 | /// hero timecode is the design contract silently moving. |
| 186 | + /// | |
| 187 | + /// Sizes are all whole pixels (raised from the original 13/10.5/9.5-10/9/8 | |
| 188 | + /// scale, which put glyph baselines on half-pixel rows and left body text | |
| 189 | + /// too small for crisp greyscale AA -- a pixel scan through "SPINE" at | |
| 190 | + /// the old 9px section-head size showed 5-6 intermediate grey levels per | |
| 191 | + /// stroke instead of a hard 1-2px edge). No fractional size is allowed | |
| 192 | + /// back into this scale. | |
| 178 | 193 | #[test] |
| 179 | 194 | fn the_scale_matches_design_3() { |
| 180 | - assert_eq!(HERO_TIMECODE_PX, 13.); | |
| 181 | - assert_eq!(LABEL_ROW_PX, 10.5); | |
| 182 | - assert!((9.5..=10.).contains(&CHORD_METADATA_MIN_PX)); | |
| 183 | - assert_eq!(SECTION_HEAD_PX, 9.); | |
| 184 | - assert_eq!(FLOOR_PX, 8.); | |
| 195 | + assert_eq!(HERO_TIMECODE_PX, 15.); | |
| 196 | + assert_eq!(LABEL_ROW_PX, 13.); | |
| 197 | + assert!((11. ..=12.).contains(&CHORD_METADATA_MIN_PX)); | |
| 198 | + assert_eq!(SECTION_HEAD_PX, 10.); | |
| 199 | + assert_eq!(FLOOR_PX, 9.); | |
| 200 | + for size in [ | |
| 201 | + HERO_TIMECODE_PX, | |
| 202 | + LABEL_ROW_PX, | |
| 203 | + CHORD_METADATA_MAX_PX, | |
| 204 | + CHORD_METADATA_MIN_PX, | |
| 205 | + SECTION_HEAD_PX, | |
| 206 | + FLOOR_PX, | |
| 207 | + ] { | |
| 208 | + assert_eq!(size.fract(), 0., "{size} is not a whole pixel"); | |
| 209 | + } | |
| 185 | 210 | for size in [ |
| 186 | 211 | HERO_TIMECODE_PX, |
| 187 | 212 | LABEL_ROW_PX, |
| @@ -210,9 +235,9 @@ mod tests { | ||
| 210 | 235 | } |
| 211 | 236 | |
| 212 | 237 | /// `head()` is exactly what DESIGN §3 names for section heads: Archivo, |
| 213 | - /// 700, 9px. | |
| 238 | + /// 700, `SECTION_HEAD_PX`. | |
| 214 | 239 | #[test] |
| 215 | - fn head_is_archivo_bold_9px() { | |
| 240 | + fn head_is_archivo_bold_at_section_head_size() { | |
| 216 | 241 | let h = head(); |
| 217 | 242 | assert_eq!(h.font.family.as_ref(), ARCHIVO); |
| 218 | 243 | assert_eq!(h.font.weight, FontWeight::BOLD); |