Repository navigation
feat(font): render generated glyph images - #2150
erick-dsnk wants to merge 1 commit into
Conversation
Implemented with AI assistance.
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
|
Which title reaches |
|
Windows validation of the current head Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
Validation run with Claude Code assistance. |
adriadam10
left a comment
There was a problem hiding this comment.
Checked on Linux with the PR merged onto main: guest_font and guest_font_writing_line pass, and guest_font fails with the non-test changes reverted. Windows runs by @popcoder565 and @screamm also pass.
Two things block merging:
- Dean's question above is still open: which title calls
sceFontGlyphRenderImage,sceFontGlyphRenderImageHorizontalorsceFontGlyphRenderImageVertical? A title ID and the log line are needed. - The output is inferred rather than known, and a plausible-but-wrong result is worse than a throw.
FillGeneratedImageMetrics(Render.cpp:283: thefloor/ceilrounding of left/top/right/bottom and thestrideformula), the vertical placement (Render.cpp:170-183,bearingYsums and shifting by the vertical bearings) and rendering at 72 DPI after converting the point scale are not backed by any reference: shadPS4 only stubs the export and SharpProspero gives the signature only. TechnicalDebt says the same ("need title verification"). Either measure/cite where each of these comes from, or throw for the cases not known (for example keep only the horizontal export with the metrics a title is shown to need) and list the rest as unimplemented.
Minor: Render.cpp:123-125 checks flags & ~0x11 and then flags & 0x11, so the first check is redundant with the second for the flag part.
|
Closing: the title question from 2026-10-09 (which title reaches |
What
Implements
sceFontGlyphRenderImage,sceFontGlyphRenderImageHorizontal, andsceFontGlyphRenderImageVerticalfor generated glyphs using the FreeType renderer. The renderer retains font bytes, face/glyph indices, and creation scale so glyph rendering survives source-font closure and later owner-scale changes. It handles horizontal and vertical placement, clipping, 1-byte and 4-byte surfaces, and rejects unsupported style/effect/renderer cases withNotImplemented_nid_no_patch.The export signatures are independently declared by Orbital's IDA type database and SharpProspero bindings. Console rendering semantics have not been confirmed with a title; the supported model and inferred behavior are recorded in TechnicalDebt. This implementation rasterizes the retained source glyph, so mutable outline edits and later glyph attributes are not applied. Creation slant/weight effects, nonzero form options, non-FreeType renderers, and unresolved style modes remain unsupported.
Tested
cmake --build build --target libs --parallel 2cmake --build build --target guest_font_tests guest_font_writing_line_tests --parallel 2ctest --test-dir build --output-on-failure -R '^(guest_font|guest_font_writing_line)$'(2 passed)python3 tools/check_conventions.py --base 3bd74c155db06c4dba07441b28f570121475b9b1Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository