Commit Graph
20 Commits
Author SHA1 Message Date
waozi 525e7aa1cb ui: add fixed-subset font sources 2026-08-17 17:35:16 -03:00
waozi cce6e637ee ui: add scroll-safe multiline text selection 2026-08-17 11:54:01 -03:00
waozi 3a06ea6004 mem: diagnostics; ui_text: single-tier font rasters; tray: lazy GTK
- KryonMemReport/KryonMemDebugEnabled (KRYON_MEM_DEBUG) print RSS and the
glibc arena breakdown; UIFontMemoryReport prints per-font raster stats.
- Source fonts rasterize once at the DPI-scaled base size plus one lazily
built large tier, replacing the 8-slot per-size cache. New codepoints
batch into at most one rebuild per frame per font, and atlas build churn
is returned via malloc_trim on glibc.
- KRYON_TRAY_GTK_DL: GTK_STATUS_ICON tray resolves GTK via dlopen (gtk_dl
shim) so tray-less processes never map the GTK chain.
2026-08-16 17:13:46 -03:00
waozi cf0f2b57db Fix per-codepoint font fallback switching typefaces for covered glyphs
RegisterUIFontSource baked a static, immutable glyph atlas
(dynamic_codepoints hardcoded 0) even though it retains the raw font
bytes, so any codepoint not in the initial set fell through
font_for_codepoint() to a different registered font -- the visible
'different broken font' for characters like ae oe ue ss when the active
locale's pre-baked set omitted them.

Source fonts now always set dynamic_codepoints=1: any glyph the file
contains renders in the font's own typeface, and the cross-font fallback
fires only for scripts genuinely absent from the active file. When no
codepoint set is passed, seed ui_font_codepoints() (ASCII + Latin +
Latin Extended + punctuation + currency + Greek + Cyrillic) so common
scripts render with no first-frame atlas rebuild.

Also fix a latent masquerade: raylib LoadFontFromMemory returns
GetFontDefault() on failure (.ttc, corrupt), which font_valid()
accepted, so failed sources polluted the fallback chain as the raylib
ASCII bitmap. A result sharing the default font's texture id is now
treated as failure, and a failed registration clears its slot.

RegisterUIFontFileSource's dynamic_codepoints parameter is now
redundant (source fonts are always dynamic) and is dropped; callers
migrated separately. RegisterUIFont (pre-baked Font handle, no source
bytes) stays static by necessity.
2026-08-13 08:16:04 -05:00
waozi c9b8e27e4c Canonicalize widget API 2026-08-09 19:52:01 -03:00
waozi 0d360a0160 clean kryon app api 2026-08-09 12:44:52 -03:00
waozi d07078d2b2 Move UI runtime to declarative nodes 2026-08-06 07:15:55 -03:00
waozi cd51d7d9ca Centralize native theme defaults 2026-08-05 17:46:25 -03:00
waozi 46834e5234 Add dynamic font fallback loading 2026-07-27 18:51:09 -03:00
waozi 2123449504 Add Kryon widget inspection lifecycle 2026-07-20 10:56:27 -03:00
waozi a462581680 Add Clay and remove fontchop 2026-07-18 07:29:00 -03:00
waozi 48ce99fafc Add selectable text and tighten modal controls 2026-07-17 21:43:58 -03:00
waozi 336e743ac7 Support per-option dropdown fonts 2026-07-17 00:50:03 -03:00
waozi 0ce98191d3 Add source-based UI font cache 2026-07-17 00:18:13 -03:00
waozi 8be2b38625 Revert "Support exact-size UI fonts"
This reverts commit 0641fbebfe.
2026-07-16 23:44:10 -03:00
waozi 0641fbebfe Support exact-size UI fonts 2026-07-16 23:43:14 -03:00
waozi fd3adb5de4 Add real font asset loading 2026-07-16 21:43:27 -03:00
waozi d606232116 Use fontchop submodule for UI fonts 2026-07-15 23:36:23 -03:00
waozi 4d8203135e Expose Raylib API through Flint 2026-07-10 23:32:08 -03:00
waozi d981aff430 Rename public API to raylib-style names 2026-07-09 15:42:55 -03:00