fix(text): carry a glyph's negative bearing and harden the bake's extents

This commit is contained in:
Martino Ferrari committed 2026-09-28 16:32:18 +02:00
1 parent b0f9fbbb35
commit d853db62ae
5 files changed
+470 -60

No files matched your search

+6 -3
View File
@@ -98,9 +98,12 @@ class Renderer {
/// which is the same lifetime rule `Plot::set_text_backend()` states.
void set_text_backend(const render::TextBackend* font) noexcept;
/// The backend the last frame was drawn with, or the embedded face when the
/// host installed none. The renderer's own wrapper while a frame is in flight,
/// so a caller reads this after `draw()` to see what the plot was handed.
/// The backend this renderer *borrows*: whatever `set_text_backend()` was given,
/// or the embedded face when nothing was installed. It is deliberately **not**
/// the `AxisFont` wrapper the renderer builds around it -- after a `draw()`,
/// `Plot::text_backend()` reads back that wrapper, because the wrapper is what
/// the plot measured with -- so a caller checking or re-pointing the face itself
/// asks here.
const render::TextBackend* text_backend() const noexcept { return font_; }
/// Starts a frame: records `fb_w` x `fb_h` for the projection, flips