feat(libSceFreeTypeOt): resolve the exports libSceFreeType already implements #17865

Merged
AlfaRojo merged 6 commits from upstream-pr/17865 into main 2026-11-13 08:22:43 +00:00
AlfaRojo commented 2026-11-09 19:18:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlfaRojo on 2026-11-09T19:18:55Z.


What

libSceFreeTypeOt exported ten NIDs as throwing placeholders: Dr3F3qrSQ2c (sceFreeTypeOtGlyphCopy), x8y0qzLiYOU (sceFreeTypeOtHasPSGlyphNames), 5qqbXOGlHw4 (sceFreeTypeOtLibraryVersion), BqGJsJcFYaM (sceFreeTypeOtOutlineDone), QH2emcgeFck (sceFreeTypeOtOutlineNew), 9km02mPqPJE (sceFreeTypeOtOutlineRender), 8fAMdZCnewA (sceFreeTypeOtPropertyGet), LsB538+IPrE (sceFreeTypeOtPropertySet), hz-J3hohXW8 (sceFreeTypeOtQAlloc) and 5ipBcLYVc2k (sceFreeTypeOtRemoveModule). tools/nid_names.py shows they are exactly FT_Glyph_Copy, FT_Has_PS_Glyph_Names, FT_Library_Version, FT_Outline_Done, FT_Outline_New, FT_Outline_Render, FT_Property_Get, FT_Property_Set, FT_QAlloc and FT_Remove_Module, which libSceFreeType implements. FT_Stroker_Export (2rcvKZfm5rI) is left out because #17580 implements it. The module's other library, face and outline exports (FT_Init_FreeType, FT_New_Memory_Face, FT_Load_Glyph, FT_Outline_Check, …) already reach those libSceFreeType wrappers, so libraries, faces and outlines are shared objects between the two modules.

  • Linux and macOS: the ten placeholders are removed, so the NIDs resolve through the module's libSceFreeType dependency like the other forwarded exports.
  • Windows: ForwardExports.cpp gets ten typed thunks with the same NIDs, in the file's alphabetical order.
  • The placeholders' leftover declarations are removed from libSceFreeType/include/Api.hpp and from the module's own include/MemoryAllocation.hpp, which keeps the FT_Realloc and FT_QRealloc placeholder declarations #12373 added.
  • The module test's library target also depends on the patched libSceFreeType.prx, which the patched test resolves symbols from.

The names leave the debt file's "provider-specific prototypes unverified" lists and get an entry saying their prototypes are assumed to be FreeType's public ones, unverified for the provider's version, with results, limits and throws those of the libSceFreeType wrappers over the bundled FreeType 2.15.0; it names the visible consequence, FT_Library_Version reporting 2.15.0 where a device reported 2.4.11. This is the same approach as #17776 for FT_Open_Face and the glyph-slot synthesis exports; the PRs touch neighbouring lines of the debt file and the test and merge together.

Tested

Windows 11 Pro (10.0.26200), WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, BUILD_TESTING=ON, on main 4b71464421. After building guest_freetype_ot_tests and guest_freetype_ot_libraries, guest_freetype_ot and guest_freetype_ot_patched pass in 3 of 3 runs. The libSceFreeType tests the forwards rely on, guest_freetype_glyph, guest_freetype_stroker, guest_freetype_outline_render, guest_freetype_module_properties, guest_freetype_module_properties_nid, guest_freetype_memory_allocation, guest_freetype_memory_allocation_nid, guest_freetype_stroker_outputs and guest_freetype_stroker_outputs_nid, pass (run at the branch's first commit 0a294acf32, before main was merged). public_headers passes, tools/check_test_registration.py reports every APS5_VABI source compiled, and tools/check_conventions.py --base upstream/main is clean.

  • Re-run after merging main 4b71464421 (which brought #12373's Realloc/QRealloc placeholders next to the removed ones): same results.

tools/pr_overlap.py lists #17580, which implements FT_Stroker_Export, so that NID is left out of this PR; #17776, #17772, #16122 and #17779, which remove neighbouring placeholders in the same files, so whichever merges second resolves adjacent-hunk conflicts, none of them adding these ten exports; and #14212, the repository-wide debt reformat.

Linux and macOS not run; there the ten NIDs resolve through the module's libSceFreeType dependency as the other forwarded exports do.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5229723978 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17865). Originally posted by [AlfaRojo](https://github.com/AlfaRojo) on 2026-11-09T19:18:55Z. --- ### What libSceFreeTypeOt exported ten NIDs as throwing placeholders: `Dr3F3qrSQ2c` (`sceFreeTypeOtGlyphCopy`), `x8y0qzLiYOU` (`sceFreeTypeOtHasPSGlyphNames`), `5qqbXOGlHw4` (`sceFreeTypeOtLibraryVersion`), `BqGJsJcFYaM` (`sceFreeTypeOtOutlineDone`), `QH2emcgeFck` (`sceFreeTypeOtOutlineNew`), `9km02mPqPJE` (`sceFreeTypeOtOutlineRender`), `8fAMdZCnewA` (`sceFreeTypeOtPropertyGet`), `LsB538+IPrE` (`sceFreeTypeOtPropertySet`), `hz-J3hohXW8` (`sceFreeTypeOtQAlloc`) and `5ipBcLYVc2k` (`sceFreeTypeOtRemoveModule`). `tools/nid_names.py` shows they are exactly `FT_Glyph_Copy`, `FT_Has_PS_Glyph_Names`, `FT_Library_Version`, `FT_Outline_Done`, `FT_Outline_New`, `FT_Outline_Render`, `FT_Property_Get`, `FT_Property_Set`, `FT_QAlloc` and `FT_Remove_Module`, which libSceFreeType implements. `FT_Stroker_Export` (`2rcvKZfm5rI`) is left out because #17580 implements it. The module's other library, face and outline exports (`FT_Init_FreeType`, `FT_New_Memory_Face`, `FT_Load_Glyph`, `FT_Outline_Check`, …) already reach those libSceFreeType wrappers, so libraries, faces and outlines are shared objects between the two modules. - Linux and macOS: the ten placeholders are removed, so the NIDs resolve through the module's libSceFreeType dependency like the other forwarded exports. - Windows: `ForwardExports.cpp` gets ten typed thunks with the same NIDs, in the file's alphabetical order. - The placeholders' leftover declarations are removed from `libSceFreeType/include/Api.hpp` and from the module's own `include/MemoryAllocation.hpp`, which keeps the `FT_Realloc` and `FT_QRealloc` placeholder declarations #12373 added. - The module test's library target also depends on the patched `libSceFreeType.prx`, which the patched test resolves symbols from. The names leave the debt file's "provider-specific prototypes unverified" lists and get an entry saying their prototypes are assumed to be FreeType's public ones, unverified for the provider's version, with results, limits and throws those of the libSceFreeType wrappers over the bundled FreeType 2.15.0; it names the visible consequence, `FT_Library_Version` reporting 2.15.0 where a device reported 2.4.11. This is the same approach as #17776 for `FT_Open_Face` and the glyph-slot synthesis exports; the PRs touch neighbouring lines of the debt file and the test and merge together. ### Tested Windows 11 Pro (10.0.26200), WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, `BUILD_TESTING=ON`, on `main` 4b71464421. After building `guest_freetype_ot_tests` and `guest_freetype_ot_libraries`, `guest_freetype_ot` and `guest_freetype_ot_patched` pass in 3 of 3 runs. The libSceFreeType tests the forwards rely on, `guest_freetype_glyph`, `guest_freetype_stroker`, `guest_freetype_outline_render`, `guest_freetype_module_properties`, `guest_freetype_module_properties_nid`, `guest_freetype_memory_allocation`, `guest_freetype_memory_allocation_nid`, `guest_freetype_stroker_outputs` and `guest_freetype_stroker_outputs_nid`, pass (run at the branch's first commit 0a294acf32, before `main` was merged). `public_headers` passes, `tools/check_test_registration.py` reports every `APS5_VABI` source compiled, and `tools/check_conventions.py --base upstream/main` is clean. - Re-run after merging `main` 4b71464421 (which brought #12373's Realloc/QRealloc placeholders next to the removed ones): same results. `tools/pr_overlap.py` lists #17580, which implements `FT_Stroker_Export`, so that NID is left out of this PR; #17776, #17772, #16122 and #17779, which remove neighbouring placeholders in the same files, so whichever merges second resolves adjacent-hunk conflicts, none of them adding these ten exports; and #14212, the repository-wide debt reformat. Linux and macOS not run; there the ten NIDs resolve through the module's libSceFreeType dependency as the other forwarded exports do. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
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!17865
No description provided.