feat(font): render generated glyph images #2150
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2150"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by erick-dsnk on 2026-10-09T10:06:47Z.
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 repositoryImported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:46:47Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
3aa719ec, merged ontomaind70b8998in one build with 38 other PRs that had no Windows run.guest_font. None of them reported skipping a case.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:15:11Z.
Which title reaches
sceFontGlyphRenderImage(or the horizontal/vertical variants) on main? With the ID and the log line this can go in; otherwise I will close it until one does.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T08:01:06Z.
Progress report (
47d2544→3aa719e)📈 System libraries: 84.76% (+0.07%, +2 implemented functions)
✅ 2 implemented
sceFontGlyphRenderImageHorizontalsceFontGlyphRenderImageVerticalImported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-10T22:11:32Z.
Windows validation of the current head
3aa719ecmerged ontomain262c0316.Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build including thelibstarget.guest_font,guest_font_writing_lineandguest_system_fontpass 3/3 (--repeat until-fail:3).ctest -j8 -E "^agc_|video_out"passes 388/388.main'slibSceFont/src/Render.cppand this PR's tests,guest_fontfails, so the coverage detects the previous behaviour.Validation run with Claude Code assistance.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T00:08:46Z.
Review: CHANGES_REQUESTED
Checked on Linux with the PR merged onto main:
guest_fontandguest_font_writing_linepass, andguest_fontfails with the non-test changes reverted. Windows runs by @popcoder565 and @screamm also pass.Two things block merging:
sceFontGlyphRenderImage,sceFontGlyphRenderImageHorizontalorsceFontGlyphRenderImageVertical? A title ID and the log line are needed.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-125checksflags & ~0x11and thenflags & 0x11, so the first check is redundant with the second for the flag part.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:24:22Z.
Closing: the title question from 2026-10-09 (which title reaches
sceFontGlyphRenderImageon main, with the log line) and the 2026-10-11 review have had no reply or push.Reopen it, or comment here, when it's addressed; it can be picked up again then.
Pull request closed