feat(libSceFreeTypeOt): export the vertical-metrics and service-list helpers #16825

Merged
juanpimg merged 1 commit from upstream-pr/16825 into main 2026-11-11 13:26:47 +00:00
juanpimg commented 2026-11-07 17:14:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by juanpimg on 2026-11-07T17:14:40Z.


What

Adds two libSceFreeTypeOt exports: ft_synthesize_vertical_metrics (NID y4Dg0njlwIU) and ft_service_list_lookup (NID 00MQVzW2OPY). They follow bundled FreeType 2.13.3 ftobjs.c; the console prototypes and FreeType version equivalence are unverified.

Both exports use the library's resolved-name convention: <name>_nid_postfix, which tools/nid_names.py hashes to the inventory NID, with no APS5_EXPORT alias. The suffix keeps them distinct from the bundled FreeType's plain ft_* symbols, which stay LOCAL in the module, so there is no interposition and no linker flag. The debt entry is 687 characters.

Stacked on #16823, which also appends to Export.cpp, Calc.hpp and GuestFreeTypeCorner.cpp. Merge #16823 first; this branch then rebases to just these two functions. The two pull requests declare different NIDs.

Tested

CachyOS Linux, kernel 7.3.1-1-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build, rebased onto current main (d792f1ad5f).

  • guest_freetype_corner, guest_freetype_ot_constants, guest_freetype_ot_memory, guest_freetype_ot_raccess: 4/4 pass, covering normal/negative/clamped/odd-advance/non-zero-advance/null metrics and match/later-match/miss/empty-id/null-array/null-id descriptor cases.
  • readelf on the built PRX shows the two <name>_nid_postfix GLOBAL symbols while the bundled ft_synthesize_vertical_metrics/ft_service_list_lookup stay LOCAL, so there is no interposition.
  • The NID patcher resolves both _nid_postfix symbols to their inventory NIDs (y4Dg0njlwIU, 00MQVzW2OPY) in the patched libSceFreeTypeOt.prx.
  • check_conventions.py --base origin/main reports no findings, including the debt-entry length.
  • python3 tools/check_conventions.py --base origin/main: passes.
  • git diff --check: clean.
  • No title was run: the contributor has no PS5 and no game dumps.

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: #16823
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5204061640 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16825). Originally posted by [juanpimg](https://github.com/juanpimg) on 2026-11-07T17:14:40Z. --- ### What Adds two `libSceFreeTypeOt` exports: `ft_synthesize_vertical_metrics` (NID `y4Dg0njlwIU`) and `ft_service_list_lookup` (NID `00MQVzW2OPY`). They follow bundled FreeType 2.13.3 `ftobjs.c`; the console prototypes and FreeType version equivalence are unverified. Both exports use the library's resolved-name convention: `<name>_nid_postfix`, which `tools/nid_names.py` hashes to the inventory NID, with no `APS5_EXPORT` alias. The suffix keeps them distinct from the bundled FreeType's plain `ft_*` symbols, which stay LOCAL in the module, so there is no interposition and no linker flag. The debt entry is 687 characters. **Stacked on #16823**, which also appends to `Export.cpp`, `Calc.hpp` and `GuestFreeTypeCorner.cpp`. Merge #16823 first; this branch then rebases to just these two functions. The two pull requests declare different NIDs. ### Tested <!-- 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. --> CachyOS Linux, kernel 7.3.1-1-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build, rebased onto current `main` (`d792f1ad5f`). - `guest_freetype_corner`, `guest_freetype_ot_constants`, `guest_freetype_ot_memory`, `guest_freetype_ot_raccess`: 4/4 pass, covering normal/negative/clamped/odd-advance/non-zero-advance/null metrics and match/later-match/miss/empty-id/null-array/null-id descriptor cases. - `readelf` on the built PRX shows the two `<name>_nid_postfix` GLOBAL symbols while the bundled `ft_synthesize_vertical_metrics`/`ft_service_list_lookup` stay LOCAL, so there is no interposition. - The NID patcher resolves both `_nid_postfix` symbols to their inventory NIDs (`y4Dg0njlwIU`, `00MQVzW2OPY`) in the patched `libSceFreeTypeOt.prx`. - `check_conventions.py --base origin/main` reports no findings, including the debt-entry length. - `python3 tools/check_conventions.py --base origin/main`: passes. - `git diff --check`: clean. - No title was run: the contributor has no PS5 and no game dumps. ### 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: #16823 - [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!16825
No description provided.