feat(libSceFontFt): implement the font format support exports #6400
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6400"
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 Capmare on 2026-10-15T14:03:33Z.
What
Implements 11
sceFontFtSupport*exports that threwNotImplemented_nid_no_patch:Bdf,Cid,OpenType,OpenTypeOtf,OpenTypeTtf,Pcf,Pfr,TrueType,Type1,Type42andWinFonts. The FontFt library always registers FreeType's default modules, so each call returns 0 when the host FreeType has the matching module (bdf,t1cid,cff,truetype,pcf,pfr,type1,type42,winfonts;OpenTypeneedscffandtruetype) and throwsstd::runtime_errorwhen it does not. The signatures (no parameters, as declared), the format-to-module mapping and the return value are assumptions, recorded in the newdocs/dev/debt/libSceFontFt.md; shadPS4 only logs these calls.Why return 0 is not an invented success: the driver always calls
FT_Add_Default_Modules, so each format is available when the host FreeType has its module, and the call returns 0 only then. It throws when the module is missing. No console measurement exists; the debt file lists the return value as unverified.Left unimplemented because their meaning is unknown:
sceFontFtSupportTrueTypeGx,sceFontFtSupportFontFormats,sceFontFtSupportSystemFonts, the alias calls andsceFontSelectGlyphsFt.librariesprogress: 3279/3696 (88.72%) to 3290/3696 (89.02%) withtools/progress.pyon themainof the first push. A reviewer measured the merge into a newermain(6efb7261b): 3480/3853 (90.32%) to 3491/3853 (90.6%).Tested
BUILD_TESTING=ON:guest_font(extended with the 11 calls) andguest_font_writing_linepass. With one module name changed to a wrong one,guest_fontaborts.python3 tools/check_conventions.py --base origin/mainpasses.libSceFontFt.prx: all 11 return 0, andsceFontFtSupportTrueTypeGxstill throws.Checklist
main; no other open PR implements the same functions (I checked the diffs of every open PR that touches Font files)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T14:23:24Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libSceFontFt.mdSome comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestFont.cppcore/libs/prx/libSceFontFt/Export.cppdocs/dev/debt/libSceFontFt.mdImported from boykopovar/AnyPS5. Originally posted by Aspct3434 on 2026-10-18T12:47:10Z.
Review: COMMENTED
Tested on Windows, since the PR was tested on Linux only.
Windows 11, WinLibs GCC 15.2.0 r7, full build with the Windows CI configure flags, this PR merged into
mainat6efb7261b:guest_font,guest_system_fontandguest_font_writing_linepass, so all 11 module names exist in the bundled FreeType on Windows as well.python tools/select_tests.py ctest build --timeout 120: 1478 tests, 0 failed; 497 skipped, all expected bytools/check_skips.py --job windows.tools/progress.pyon the merge: 3480/3853 (90.32%) to 3491/3853 (90.6%). The figures in the description are from an oldermain.Two points that may need addressing before merge:
Source for the return value. The only reference for "no parameters, returns 0" is shadPS4, where these are explicit stubs:
fontft.cpplogs(STUBBED) calledand returnsORBIS_OK. The Orbital IDA type database cited in the font debt files has nosceFontFt*entries, and SharpProspero and KytyPS5 have none either. Since AGENTS.md says never to return a made-up success, it may help to state in the description why 0 is not made up here (each format really is available, because the driver always callsFT_Add_Default_Modules), or to back it with a console measurement like the one in #7463.Overlap with #6447. The overlap comment lists #6447 on the same lines. It removes the
NotImplemented_nid_no_patchcall from all 19libSceFontFtexports and keeps the stubs'return 0, including the eight this PR leaves throwing. The checklist says no other open PR implements these functions, so it would help to mention #6447 and agree on which goes first (Depends on).Nit: the new debt entry links shadPS4 at
blob/main; other entries pin a commit, for example7da7a8e1f98eca9d8f01f84d20681f8faa0bd8fd.Tested and written with help from Claude Code.
Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T13:30:03Z.
Thank you for testing on Windows.
FT_Add_Default_Modules, so the format is available when the call returns 0. If a module is missing, the call throws. There is no console measurement; the debt file lists the return value as unverified. I added this reason to the description.Depends on.7da7a8e1f98eca9d8f01f84d20681f8faa0bd8fd.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T23:27:25Z.
Progress report (
385ed71→8489e74)📈 System libraries: 90.6% (+0.28%, +11 implemented functions)
✅ 11 implemented
sceFontFtSupportBdfsceFontFtSupportCidsceFontFtSupportOpenTypesceFontFtSupportOpenTypeOtfsceFontFtSupportOpenTypeTtfsceFontFtSupportPcfsceFontFtSupportPfrsceFontFtSupportTrueTypesceFontFtSupportType1sceFontFtSupportType42sceFontFtSupportWinFonts