Skip to content

feat(font): accept libSceFontFt format support functions as silent stubs - #1450

Closed
camezaro-intc wants to merge 1 commit into
boykopovar:mainfrom
camezaro-intc:feat/font-ft-format-support
Closed

camezaro-intc wants to merge 1 commit into
boykopovar:mainfrom
camezaro-intc:feat/font-ft-format-support

Conversation

@camezaro-intc

Copy link
Copy Markdown
Contributor

What

Accept the 14 libSceFontFt format support functions (sceFontFtSupportBdf, sceFontFtSupportCid, sceFontFtSupportFontFormats, sceFontFtSupportOpenType, sceFontFtSupportOpenTypeOtf, sceFontFtSupportOpenTypeTtf, sceFontFtSupportPcf, sceFontFtSupportPfr, sceFontFtSupportSystemFonts, sceFontFtSupportTrueType, sceFontFtSupportTrueTypeGx, sceFontFtSupportType1, sceFontFtSupportType42, sceFontFtSupportWinFonts) as silent stubs returning 0 (SCE_FONT_OK).

In the console SDK, these functions register font format drivers with the FreeType subsystem. In AnyPS5 (as in shadPS4), all supported font formats are compiled and built directly into FreeType, making additional format registration unnecessary. Returning success allows titles initializing font format drivers to proceed cleanly without throwing NotImplemented.

Documented under ### Silent stubs in docs/dev/TechnicalDebt.md and added unit test assertions to core/libs/tests/GuestFont.cpp.

Tested

  • Windows 11 x64, GCC 15.2.0 (MinGW64)
  • Built guest_font_tests target and ran CTest guest_font (passed 100%)
  • Validated with tools/check_conventions.py --base upstream/main (passed 0 findings)

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

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Requested changes:

  • core/libs/prx/libSceFontFt/Export.cpp:34-88: these are silent stubs for non-UI behaviour. On the console the functions register format drivers with FreeType, and we have no evidence of which arguments a title passes or what it expects back. CONTRIBUTING reserves silent no-ops for UI behaviour, and unverified exports must keep throwing. shadPS4's versions are (STUBBED) return ORBIS_OK with no parameters, so they give neither a signature nor behaviour; "as shadPS4 does" only describes an empty stub. KytyPS5, prosper and prospero-win don't implement them.
  • No title evidence: none of the imports we have static data for (Astro's Playroom) uses them, and no Game bring-up Discussion names them. Please point to a title (PPSAxxxxx) that calls one of these and fails on the NotImplemented throw today, or the throw stays. With that evidence, also say what the call contract is (args, return) and where it comes from.
  • #1498 changes the same 14 functions in Export.cpp. List it under Depends on (or coordinate which of the two lands) so one doesn't break the other.
  • core/libs/tests/GuestFont.cpp:137-150: the test only pins the 0 the stub returns itself. If the stubs stay, it should check something observable, such as a font created and rendered after the calls.

@camezaro-intc

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review and explanation @adriadam10!

Understood completely regarding the project's policy on silent stubs: non-UI exports must continue to throw NotImplemented_nid_no_patch until verified by title traces (PPSA) with concrete call contracts and observable behavior. Given the lack of specific title evidence here and the ongoing work in #1498, closing this PR to keep the throws intact as intended.

Appreciate the guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants