feat(libSceFreeType): open guest font streams #16636

Merged
DonRyuzaki merged 1 commit from upstream-pr/16636 into main 2026-11-11 20:52:42 +00:00
DonRyuzaki commented 2026-11-07 11:21:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-07T11:21:33Z.


What

Support FT_OPEN_STREAM in libSceFreeType FT_Open_Face. A bridge maps the guest LP64 stream record to a host FreeType stream, routes read and close callbacks, and retains the bridge with the face. It supports memory-backed and callback-backed guest streams. The two FreeType modules now share one definition of the 80-byte guest stream record; the previous duplicate caused the Windows build failure.

FreeType closes the guest stream when the face is destroyed or an open attempt fails. Console signature, lifetime and errors are unmeasured. Mixed source flags, FT_OPEN_DRIVER and FT_OPEN_PARAMS remain unsupported. Guest stream and backing bytes must outlive the face. No title unblock is claimed.

Tested

  • Windows 11 x86-64, MinGW GCC 15.2.0, Release; upstream main b312f82bfc, clean rebased head f56e11947af. Full runtime libs and eight focused test executables built with two below-normal-priority compiler jobs. Runtime NID patching passed, including libSceFreeType and libSceFreeTypeOt. The relinker was not rebuilt locally.
  • Nine focused CTests passed: guest_freetype_open_face, guest_freetype_ot_constants, guest_freetype_ot_memory, guest_freetype_ot_raccess, guest_freetype_ps_font_value, guest_freetype_attach_file, guest_freetype_outline_render, and both raw and patched guest_freetype_postscript_private cases. The stream test covers memory and callback streams, reads, metadata, and close behavior. The neighboring tests cover FreeType exports merged into main during the rebase.
  • tools/check_conventions.py --base origin/main and git diff --check passed. Public-header audit verified 407 libraries and 33,491 exports.
  • The earlier Windows check failed while compiling libSceFreeTypeOt because two headers defined GuestStreamRec. The shared definition fixed that failure; the replacement hosted Windows check passed on the prior head 1331b31c93. Fresh hosted checks for this rebased head are separate from the local results. JJenkx independently reported 3/3 guest_freetype_open_face passes on the initial head, and blawesom reported a 68/68 Linux FreeType suite on the prior head; neither report tests this final rebase.
  • The overlap bot could not compare eight older branches that conflict with main. I reviewed their changed files and relevant shared-code patches: they cover separate FreeType exports or debt-file formatting. Local tools/pr_overlap.py cannot query GitHub because gh is unavailable.

No console, retail title, Linux or system-dependency build was tested locally on this rebased head.

Checklist

  • Based on current main; no other open PR implements the same function path
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stub added
  • No notes, investigation Markdown files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5201119618 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16636). Originally posted by [DonRyuzaki](https://github.com/DonRyuzaki) on 2026-11-07T11:21:33Z. --- ### What Support FT_OPEN_STREAM in libSceFreeType FT_Open_Face. A bridge maps the guest LP64 stream record to a host FreeType stream, routes read and close callbacks, and retains the bridge with the face. It supports memory-backed and callback-backed guest streams. The two FreeType modules now share one definition of the 80-byte guest stream record; the previous duplicate caused the Windows build failure. FreeType closes the guest stream when the face is destroyed or an open attempt fails. Console signature, lifetime and errors are unmeasured. Mixed source flags, FT_OPEN_DRIVER and FT_OPEN_PARAMS remain unsupported. Guest stream and backing bytes must outlive the face. No title unblock is claimed. ### Tested - Windows 11 x86-64, MinGW GCC 15.2.0, Release; upstream main `b312f82bfc`, clean rebased head `f56e11947af`. Full runtime `libs` and eight focused test executables built with two below-normal-priority compiler jobs. Runtime NID patching passed, including libSceFreeType and libSceFreeTypeOt. The relinker was not rebuilt locally. - Nine focused CTests passed: `guest_freetype_open_face`, `guest_freetype_ot_constants`, `guest_freetype_ot_memory`, `guest_freetype_ot_raccess`, `guest_freetype_ps_font_value`, `guest_freetype_attach_file`, `guest_freetype_outline_render`, and both raw and patched `guest_freetype_postscript_private` cases. The stream test covers memory and callback streams, reads, metadata, and close behavior. The neighboring tests cover FreeType exports merged into main during the rebase. - `tools/check_conventions.py --base origin/main` and `git diff --check` passed. Public-header audit verified 407 libraries and 33,491 exports. - The earlier Windows check failed while compiling libSceFreeTypeOt because two headers defined `GuestStreamRec`. The shared definition fixed that failure; the replacement hosted Windows check passed on the prior head `1331b31c93`. Fresh hosted checks for this rebased head are separate from the local results. JJenkx independently reported 3/3 `guest_freetype_open_face` passes on the initial head, and blawesom reported a 68/68 Linux FreeType suite on the prior head; neither report tests this final rebase. - The overlap bot could not compare eight older branches that conflict with main. I reviewed their changed files and relevant shared-code patches: they cover separate FreeType exports or debt-file formatting. Local `tools/pr_overlap.py` cannot query GitHub because `gh` is unavailable. No console, retail title, Linux or system-dependency build was tested locally on this rebased head. ### Checklist - [x] Based on current main; no other open PR implements the same function path - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stub added - [x] No notes, investigation Markdown files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [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 (Codex)
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!16636
No description provided.