feat(libSceFreeType): implement FT_Get_Track_Kerning #10588

Merged
MarcZX10 merged 6 commits from upstream-pr/10588 into main 2026-11-04 17:35:19 +00:00
MarcZX10 commented 2026-10-24 11:21:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T11:21:41Z.


What

Adds FT_Get_Track_Kerning to libSceFreeType, forwarding to the bundled FreeType 2.13.3 through the guest face. The point size and the result use the guest's 64-bit FT_Fixed; the result is written only when the native call succeeds, as in ftobjs.c. A point size outside the host FT_Fixed range throws, which only matters where the native type is 32 bits (Windows). Console signature and errors are unverified; the debt entry says so.

Commits: implementation, test, debt entry.

Tested

Linux x86-64, GCC, full CMake build (Ninja, Release). guest_freetype_track_kerning compares error code and output with a native FT_Face for a TrueType and a BDF face, over several point sizes and degrees, checks the output stays untouched on error, and covers null face, null result and an unregistered face. The host CPU (Xeon E5-1620 v2) fails the startup CPU-feature gate, so I ran the test with that check disabled in a local, uncommitted edit; it exits 0. Windows was not run. tools/check_conventions.py and git diff --check pass. No title or GPU involved.

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:4994950930 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10588). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T11:21:41Z. --- ### What Adds `FT_Get_Track_Kerning` to libSceFreeType, forwarding to the bundled FreeType 2.13.3 through the guest face. The point size and the result use the guest's 64-bit `FT_Fixed`; the result is written only when the native call succeeds, as in [ftobjs.c](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftobjs.c). A point size outside the host `FT_Fixed` range throws, which only matters where the native type is 32 bits (Windows). Console signature and errors are unverified; the debt entry says so. Commits: implementation, test, debt entry. ### Tested Linux x86-64, GCC, full CMake build (Ninja, Release). `guest_freetype_track_kerning` compares error code and output with a native `FT_Face` for a TrueType and a BDF face, over several point sizes and degrees, checks the output stays untouched on error, and covers null face, null result and an unregistered face. The host CPU (Xeon E5-1620 v2) fails the startup CPU-feature gate, so I ran the test with that check disabled in a local, uncommitted edit; it exits 0. Windows was not run. `tools/check_conventions.py` and `git diff --check` pass. No title or GPU involved. ### 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 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
MarcZX10 commented 2026-11-02 04:57:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:57:39Z.

Review: COMMENTED


Fix-up checked — include is in place, no open points

The only new reply is a fix-up note from oneandonlydean, and the include it describes is present in the code at this head.

What I ran

  • Live head: gh pr view 10588 --json headRefOid,state gives 2ccdd6373bbbdc198ae9e0e1463e0a856e5f45c6, OPEN, same as the batch file.
  • Comments, review comments and reviews fetched with gh api and filtered to users other than MarcZX10 and bots, newer than 2026-10-27T02:23:12Z.
  • Hosted checks read with gh api repos/boykopovar/AnyPS5/commits/<head>/check-runs.
  • Code read with git show 2ccdd637:<path> and git diff upstream/main...2ccdd637.
  • Nothing was built or run.

Results

Check Result Note
Live head matches batch OPEN
conventions success at this head
windows success at this head
report success at this head
linux, relinker skipped not run on this head

Findings

  • oneandonlydean, 2026-10-29T11:52:14Z: added the libSceFreeType Api.hpp include to src/TrackKerning.cpp. Confirmed: TrackKerning.cpp:1 includes prx/libSceFreeType/include/Api.hpp, and Api.hpp:100 declares FT_Get_Track_Kerning_nid_postfix, which the definition at TrackKerning.cpp:14 matches.
  • No question or change request is open. A short acknowledgement is enough.

Sources

Not verified

  • The test was not built or run here. The Windows result is the hosted check only.
  • The linux and relinker jobs are skipped on this head, so no Linux test result exists for it.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732250280 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10588#pullrequestreview-5732250280). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T04:57:39Z. **Review:** COMMENTED --- # Fix-up checked — include is in place, no open points The only new reply is a fix-up note from oneandonlydean, and the include it describes is present in the code at this head. ## What I ran - Live head: `gh pr view 10588 --json headRefOid,state` gives `2ccdd6373bbbdc198ae9e0e1463e0a856e5f45c6`, OPEN, same as the batch file. - Comments, review comments and reviews fetched with `gh api` and filtered to users other than MarcZX10 and bots, newer than 2026-10-27T02:23:12Z. - Hosted checks read with `gh api repos/boykopovar/AnyPS5/commits/<head>/check-runs`. - Code read with `git show 2ccdd637:<path>` and `git diff upstream/main...2ccdd637`. - Nothing was built or run. ## Results | Check | Result | Note | |---|---|---| | Live head | matches batch | OPEN | | conventions | success | at this head | | windows | success | at this head | | report | success | at this head | | linux, relinker | skipped | not run on this head | ## Findings - oneandonlydean, 2026-10-29T11:52:14Z: added the libSceFreeType `Api.hpp` include to `src/TrackKerning.cpp`. Confirmed: `TrackKerning.cpp:1` includes `prx/libSceFreeType/include/Api.hpp`, and `Api.hpp:100` declares `FT_Get_Track_Kerning_nid_postfix`, which the definition at `TrackKerning.cpp:14` matches. - No question or change request is open. A short acknowledgement is enough. ## Sources - https://github.com/boykopovar/AnyPS5/blob/2ccdd6373bbbdc198ae9e0e1463e0a856e5f45c6/core/libs/prx/libSceFreeType/src/TrackKerning.cpp#L1-L1 - https://github.com/boykopovar/AnyPS5/blob/2ccdd6373bbbdc198ae9e0e1463e0a856e5f45c6/core/libs/prx/libSceFreeType/include/Api.hpp#L100-L100 ## Not verified - The test was not built or run here. The Windows result is the hosted check only. - The linux and relinker jobs are skipped on this head, so no Linux test result exists for it.
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!10588
No description provided.