feat(libSceFreeType): expose Unicode variation selectors #9404
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9404"
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 Ondra97 on 2026-10-21T20:52:41Z.
What
Expose the five Unicode variation-selector queries in the guest FreeType bridge:
FT_Face_GetCharVariantIndex,FT_Face_GetCharVariantIsDefault,FT_Face_GetVariantSelectors,FT_Face_GetVariantsOfCharandFT_Face_GetCharsOfVariant. The adapter delegates to the bundled FreeType backend, preserves signed default-status results and native-owned, zero-terminated lists, and uses the low 32 bits of the LP64 character/selector arguments. The public umbrella header declares every export exactly once.Merge
mainthroughb611e634f7fc024f0c13e342d96de744448ef1d9and update the synthetic regression for bundled FreeType 2.15.0. Upstream ba4ee6c6bd excludes supplemental format-14/15 charmaps from automatic Unicode selection. A face containing only format 14 therefore has no active charmap in both guest and native FreeType. ItsGetCharVariantIndexqueries return 0;GetCharVariantIsDefault('A', 0xFE0F)remains 1 because that query reads the variation table independently of the active charmap. The regression checks the retained platform-0/encoding-5 subtable, both null active maps, and native parity. No export implementation changes or guest-specific fallback are needed for this review correction.The original PR cites the PS5 3.20 inventory for names/NIDs; I did not repeat that inventory audit in this correction. Console signatures, errors and FreeType-version equivalence remain unverified in the debt entry. Native-backend agreement is not console verification.
Tested
Automated hosted Windows validation: submitted head
90c70685ec6aaa5dcddb9f40cd5ac082e6cdf191merged into mainc3a5290c7de9ae867676ffdc9c3b5442b34f6150passed the changed-guest-test CI job: 2184 passed, 1024 skipped, 0 failed across 3,208 selected CTest registrations.guest_freetype_variantexecuted and passed. This is the automatic changed-guest-test selection; the skipped GPU paths supply no additional GPU qualification.Windows 11 Pro 10.0.26300 x64, AMD Ryzen 9 7900X, 31.7 GiB RAM, NVIDIA RTX 4070 Ti SUPER; these tests use the CPU. WinLibs MinGW-w64 GCC 15.2.0 UCRT POSIX SEH r7, CMake 4.3.1, Python 3.14.7, Ninja, Release,
BUILD_TESTING=ON, bundled pinned submodules. Baseb611e634f7fc024f0c13e342d96de744448ef1d9, merged pre-fix baseline46ff75e9bf9ccb72025cfcd76a4ee1f77dd37cce, final head90c70685ec6aaa5dcddb9f40cd5ac082e6cdf191.The original regression on the merged baseline failed at line 175 on this Windows host, reproducing the stale active-charmap assumption. After the test correction,
guest_freetype_variantpassed with 1,344 scalar and 147 terminated-list comparisons, including the variant-only fixture. The reviewer's Linux batch failure is an external report; I did not reproduce it on Linux or rerun the old 2.13.3 branch.cmake --build ../b --parallel 10), including the runtime libraries and test targets, with no source overlay.git diff origin/main HEAD --check: passed. The branch is 0 commits behind the stated main and merges cleanly.Reproduction commands, from the isolated source worktree (the selected compiler is on
PATH):The overlap scan examined 1,865 open PRs and found no conflicting lines or duplicate exports among comparable branches. It exited 2 because 17 other branches conflict with
main: #10582, #10591, #10593, #10594, #10600, #10601, #10602, #10604, #10606, #10609, #10611, #10613, #10616, #12004, #12373, #13486 and #14212. I manually compared every reported shared file: those changes add separate APIs/tests, unrelated debt entries or blank lines; none implements these five queries or changesGuestFreeTypeVariants.cpp. The final test/debt correction retains the scanned file/export scope. No dependency on those PRs is needed.No title, PS5 hardware, native Linux run of this head, or complete CTest suite is claimed. Earlier contributor/reviewer results apply only to their stated revisions and environments.
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-22T05:34:48Z.
Review: DISMISSED
The bridge preserves FreeType’s return conventions and delegates the cmap-14 queries to the bundled library; the regression covers the query results, list termination, alternate charmaps, absent maps, and 64-bit inputs. The reported Windows run and 10/10 focused tests are strong evidence. The current overlap scan against open PRs reports no overlap, and
git diff --checkpasses.I’m requesting one repository-required follow-up before this is ready: the branch’s recorded base is
0c6a5bd593, while currentmainis4a17c71757. Please rebase onto currentmain, rerun the focused FreeType tests and convention/overlap checks, and update the description with the refreshed base and results.git merge-treeshows the current head can merge cleanly, but the contribution checklist requires branches to be based on currentmain.No local FreeType build or test ran in this review environment. The PR’s hosted product build jobs are skipped; its eligibility, conventions, intake, labels, and report checks pass. I’m relying on the author’s detailed Windows results and the independent Linux and Windows focused runs recorded above, all of which tested the older base.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T01:21:06Z.
Review: COMMENTED
Linux run of the current head, since the description covers Windows only and the review above notes that no FreeType build ran there.
Machine: Linux x86_64, i7-8700 (6 cores / 12 threads, AVX2), Ubuntu 26.04, GCC 15.2, Release,
BUILD_TESTING=ON. Heada7ccfa05amerged ontomaine2d457be3. The merge is clean even though the branch is about 4,700 commits behind.freetypetests pass,guest_freetype_variantamong them (20 of 20 repeated runs), pluspatched_libraries. The five exports appear in the patchedlibSceFreeType.prxasdPcZ76eZb64,Vrab2WK1mgk,9Lm2mfsSmws,mGMeRKWGTL4andtl72PmqhXww.mainhas no stubs for these exports, so the test cannot link againstmain. Instead, I checked four behavioral mutations. The test catches all of them:GetVariantSelectorsreturning null (line 191),GetCharVariantIsDefaultalways returning 1 (line 162),GetCharsOfVariantcallingGetVariantsOfChar(line 192), andGetCharVariantIndexon a null face (line 194).0x100000041,0x10000FE0F,UINT64_MAX). On Linux,FT_ULongis 64 bits. Removing the wrapper'sstatic_cast<std::uint32_t>from all four functions still passes: the bundled FreeType truncates toFT_UInt32itself (ftobjs.caround line 4116). So on both hosts, those assertions check FreeType's truncation, not the wrapper's. The casts are harmless. I'm only noting that the test would not catch their removal.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.