From 522ab489cd75081707c98d3cb78fa6a618107eee Mon Sep 17 00:00:00 2001 From: meehl <12648828+meehl@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:13:58 +0100 Subject: [PATCH] Fix ascendancy flavour text size. --- src/api/rendering.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/api/rendering.rs b/src/api/rendering.rs index 8621eae..7fbe670 100644 --- a/src/api/rendering.rs +++ b/src/api/rendering.rs @@ -484,8 +484,15 @@ fn build_layout_job<'a>( } }; - // TODO: check how PoB determines font size - let font_size = (line_height - 2).clamp(11, 32) as f32; + // NOTE: This is just an approximation and was chosen based on how it looks. + // + // PoB uses pre-rendered font atlases of discrete sizes and selects the appropriate + // atlas based on the provided height. Rusty-PoB dynamically renders fonts to a + // cached font atlas to support the selection of arbitrary sizes. + // + // TODO: font size in some dropdowns is too small, e.g. socket group selection in + // 'Calcs' tab + let font_size = (line_height - 2).max(1) as f32; let mut job = LayoutJob::new( font_family,