feat(font): accept sceFontGlyphDefineAttribute as a silent stub #1160

Merged
orbz22 merged 1 commit from upstream-pr/1160 into main 2026-10-08 05:19:02 +00:00
orbz22 commented 2026-10-07 15:47:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by orbz22 on 2026-10-07T15:47:06Z.


What

Astro's Playroom (PPSA01325) terminates on sceFontGlyphDefineAttribute not implemented during start-up. Its only call site (0x1877e92) is:

sceFontGenerateCharGlyph(handle, code, &detail, &glyph)
sceFontGlyphDefineAttribute(glyph, 0x11, 0)
sceFontRenderCharGlyphImageHorizontal(handle, code, ...)   (retried with '_' on failure)
sceFontDeleteGlyph(nullptr, &glyph)

The glyph is deleted without being used, and the character is drawn from the font handle and code, not from the glyph. The title does not import sceFontGlyphGetAttribute. What the attributes mean is unknown (shadPS4 stubs the function too), so this is a silent stub under the rule in CONTRIBUTING (it unblocks a title and only affects the UI): it returns SCE_FONT_ERROR_INVALID_GLYPH for a null glyph or one without the glyph magic, and SCE_FONT_OK otherwise, ignoring the attribute and its value. The value is taken as 64 bits because the call site zeroes all of rdx. TechnicalDebt lists it under silent stubs. sceFontGlyphGetAttribute still throws.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), CMake 4.4.4, Ninja 1.13.2, on 1e5bb880.

  • guest_font now generates a glyph and checks the valid, null and non-glyph cases: --repeat until-fail:3 passed 3/3.
  • Full build, --target libs, full ctest: 393/393 passed.
  • PPSA01325 (own dump) with this libSceFont: start-up continues past the font setup to its first presentation. Getting there also needs #1158, #285 and a local libSceJobManager.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4775019972 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1160). Originally posted by [orbz22](https://github.com/orbz22) on 2026-10-07T15:47:06Z. --- ### What Astro's Playroom (PPSA01325) terminates on `sceFontGlyphDefineAttribute not implemented` during start-up. Its only call site (0x1877e92) is: ``` sceFontGenerateCharGlyph(handle, code, &detail, &glyph) sceFontGlyphDefineAttribute(glyph, 0x11, 0) sceFontRenderCharGlyphImageHorizontal(handle, code, ...) (retried with '_' on failure) sceFontDeleteGlyph(nullptr, &glyph) ``` The glyph is deleted without being used, and the character is drawn from the font handle and code, not from the glyph. The title does not import `sceFontGlyphGetAttribute`. What the attributes mean is unknown (shadPS4 stubs the function too), so this is a silent stub under the rule in CONTRIBUTING (it unblocks a title and only affects the UI): it returns `SCE_FONT_ERROR_INVALID_GLYPH` for a null glyph or one without the glyph magic, and `SCE_FONT_OK` otherwise, ignoring the attribute and its value. The value is taken as 64 bits because the call site zeroes all of `rdx`. TechnicalDebt lists it under silent stubs. `sceFontGlyphGetAttribute` still throws. ### Tested Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), CMake 4.4.4, Ninja 1.13.2, on 1e5bb880. - `guest_font` now generates a glyph and checks the valid, null and non-glyph cases: `--repeat until-fail:3` passed 3/3. - Full build, `--target libs`, full `ctest`: 393/393 passed. - PPSA01325 (own dump) with this `libSceFont`: start-up continues past the font setup to its first presentation. Getting there also needs #1158, #285 and a local `libSceJobManager`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
github-actions[bot] commented 2026-10-08 04:37:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T04:37:30Z.


Progress report (4e74283 → 0a6a8a7)

📈 System libraries: 86.17% (+0.04%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceFont sceFontGlyphDefineAttribute
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6052352873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1160#issuecomment-6052352873). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T04:37:30Z. --- <!-- progress-report --> ### Progress report (4e74283 → 0a6a8a7) 📈 **System libraries**: 86.17% (+0.04%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceFont | `sceFontGlyphDefineAttribute` | </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1160
No description provided.