feat(libSceFreeType): query Type 1 private dictionaries #9933
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9933"
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 santhoshkumar-dev on 2026-10-22T22:29:56Z.
What
Implement
FT_Get_PS_Font_Private(+yNEa4OFH1M) through the existing guest face bridge. The returned dictionary uses an explicit 224-byte LP64 guest record: every scalar, count, flag and fixed-size array is copied field by field, widening native fixed-point and long values. The Windows native record is 196 bytes. Errors leave the output unchanged, and the query does not refresh unrelated guest face or glyph data.The name/NID matches the PS5 3.20 inventory. Layout and behavior follow bundled FreeType 2.13.3 t1tables.h, fttype1.c and the native Type 1 font driver. Console ABI/backend equivalence remains unverified and is recorded in debt.
Each implemented export is declared once in the canonical public API, included by the implementation and tests. The branch preserves the latest upstream PFR APIs and all merged FreeType features.
The adapter belongs to physical
libSceFreeType. Same-NID inventory stubs in the distinct physicallibSceFreeTypeOlandlibSceFreeTypeOtproviders remain throwing helpers.Tested
Submitted and tested head
4215b79254c9e0d0d073bf84c6c9e3921854fadb, including upstream main5d52b06ff3de0b2ce640dd296db465295c80e7fa.Windows 11 x64 / WinLibs GCC 15.2.0 r7 and local Ubuntu 24.04.1 x86-64 under WSL2 / GCC 13.3.0 / glibc 2.39: Ninja Release, bundled dependencies,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=OFF. On each platform the completelibstarget and selected test executables build, and 70/70 CTests pass, zero skips: the public-header audit, all 64 public-header compilation batches and 5 focused runtime tests. Dependencies use the pinned submodule revisions. The feature, existing base/charmap APIs and packaged-library loader are covered. Both normal-symbol and actual packaged-NID modes run for the feature.Final upstream recheck:
801d5b9bc11049e6274daca09d70690bd5b8d0a9merges cleanly, and no files changed by this contribution have changed after the tested base. Results remain pinned to the exact submitted head and its stated base.Conventions, whitespace and all six pairwise merge checks across the four currently open contributions pass. Open/closed/merged history was rechecked; no replacement implementation was found. No title or physical-console execution is claimed.
The earlier macOS report by @jotitadev used Apple M2 Max, macOS 27.2, Xcode 27 and x86-64 under Rosetta on #8658 at
fa063d8b07plus the original diff and conditional libc-link fix. That host-support PR was closed for splitting. It remains attributed historical evidence; no fresh macOS runtime host is available here, so validation on the current macOS stack remains outstanding. No title or physical-console execution is claimed.Checklist
main; no other open PR implements the same functionsNotImplemented_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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:46:24Z.
Review: COMMENTED
The field-by-field LP64 adapter, output-preserving errors and font fixtures look sound; current-main whitespace and conventions pass. The author reports the Windows full build and 5/5 focused tests, including patched-NID loading and native-FreeType field comparisons. I inspected the bundled FreeType implementation: it returns
Invalid_Argumentfor a null output before the adapter writes, matching the tested unchanged-output behavior.\n\nCurrentcheck_main_sync.pyreports the branch is 308 commits behind and has a merge conflict indocs/dev/debt/libSceFreeType.md;core/libs/CMakeLists.txtalso changed on both sides. Please refresh onto current main, retain the merged debt entries as well as this Type 1 entry, and keep the test registration. The implementation/test source paths are otherwise untouched by intervening main changes.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:46:26Z.
Review: CHANGES_REQUESTED
Please refresh this branch onto current
mainand resolve the reported conflict indocs/dev/debt/libSceFreeType.md; current sync also reports a sharedcore/libs/CMakeLists.txtedit. Preserve the intervening FreeType debt entries and the new PostScript-private test registration. The exact-head implementation review and author-reported Windows tests are positive, and current-main conventions/whitespace pass; the request is solely to resolve the real merge conflict and validate the refreshed merge.Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-23T06:14:12Z.
Review: COMMENTED
macOS test:
guest_freetype_postscript_private_nidloads the unpatched libcApple M2 Max, macOS 27.2, Apple clang (Xcode 27), x86-64 Release build under Rosetta 2,
BUILD_TESTING=ON, full default build. Headc45cf89081.maindoes not build on macOS, so the platform is #8658 (feat/macos-port) @fa063d8b07with this PR's diff applied (3-way, no conflicts there; GitHub reports a conflict with currentmain).guest_freetype_postscript_privatepasses.guest_freetype_postscript_private_nidaborts:guest_freetype_postscript_private_testslinkslibcon every platform, so the process starts withunpatched/libc.prxloaded. Both libc builds have the install name@rpath/libc.prx, so when the patchedlibSceFreeType.prxasks for@rpath/libc.prx, dyld reuses the unpatched image that is already loaded, and it has no NID exports.Linking
libconly on Windows inPostScriptPrivate.cmake, asguest_jxr_lookup_testsin #9954 does, fixes it here:With that change both tests pass 3/3 (
--repeat until-fail:3). I did not run Linux here, but the same pattern failed on Linux in #9646 (patched tests could not resolve NIDs untillibcwas linked only on Windows), so this is likely not macOS-only. #9785 has the same pattern.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T06:16:50Z.
Review: CHANGES_REQUESTED
Reviewed exact head
c45cf89081770fa3b9d2c9deb2404069067e5fc2. A focused macOS test report exposes a real portability failure in the new test target:guest_freetype_postscript_private_testslinks bothfreetypeandlibcunconditionally. On macOS the test process loads unpatchedlibc.prxfirst; dyld then reuses its@rpath/libc.prxwhen loading patchedlibSceFreeType.prx, which lacks the expected NID symbol_QuRm8bUpMP0, soguest_freetype_postscript_private_nidaborts. Please link the NIDlibconly on Windows (or otherwise ensure the patched test resolves patched libc) and rerun both focused tests on macOS; the reported temporary conditional-link workaround passes 3/3. Separately, current-main sync reports a real conflict indocs/dev/debt/libSceFreeType.mdand 308 commits behind, withcore/libs/CMakeLists.txtalso touched since the merge base. Please refresh onto current main, resolve the debt entry, and rerun the focused suite on the combined tree. Local conventions pass; I did not run the FreeType runtime tests. This request is based on a platform test failure and an actual merge conflict, not queue size.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T12:21:14Z.
Review: APPROVED
Re-checked — new head, looks good
The test target now links the NID
libconly on Windows, resolving the macOS loader collision identified in the prior review; the refreshed branch also merges cleanly with currentmain.What I ran
Reviewed exact head
a5021b69034608a6b9c1fc86655e148d4d681d76against PR base60ba6ef0c7575fc37abc5610945189420f7ad774and livemainb8f0a6b2025605b78eb70646bda79f458a577c82. The current-main merge preview is clean. Environment: Linux x86-64, Python 3.11.2; no local build or tests were run.Results
mainlibconly underWIN32, matching the previously reported workaround that passed 3/3 on macOSUnedited local output
git diff --checkproduced no output and exited 0. The stack report says the current-main merge preview iscleanand all heads remained unchanged.Negative control
libc.prxfirst on macOSlibcinto the macOS test targetFindings
Blocking
None found on this head.
Non-blocking
The macOS workaround result was reported before it was integrated into this exact head; a focused macOS run on this head would complete the platform record. The CMake condition now matches that workaround.
Sources
Not verified
I did not build locally or rerun the macOS test. The hosted Windows job was still running when I reviewed; the focused Windows, Linux, and prior workaround results are author-reported.
To get this to a good state
No blocking change is requested. A focused macOS run on this head would confirm the integrated target; I will recheck if the head changes.