TextDrawer: Remove the current font and scale

Drawing now takes the style and scale too, like measuring, so the text
drawers have no font state left. UIContext keeps its current style and
passes it, and fills it in from the theme if nothing has set one yet.
PPGe passes its one font.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-27 11:54:10 +01:00
1 parent dc1e9e50fc
commit 4c7dd44351
16 files changed
+64 -108

No files matched your search

-4
View File
@@ -1005,10 +1005,6 @@ bool NativeInitGraphics(GraphicsContext *graphicsContext) {
ui_draw2d.Init(g_draw, texColorPipeline);
uiContext->Init(g_draw, texColorPipeline, colorPipeline, &ui_draw2d);
if (uiContext->Text()) {
// This seems unnecessary.
// uiContext->Text()->SetOrCreateFont(FontStyle(FontID::invalid(), FontFamily::SansSerif, 20, FontStyleFlags::Default));
}
g_screenManager->setUIContext(uiContext);
// Live before the queue is processed: a removal that comes in while the outputs' swapchains are being