feat(libSceFreeType): implement the variation and multiple-master calls #10613
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10613"
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 MarcZX10 on 2026-10-24T12:54:25Z.
What
Adds the FreeType variation and multiple-master calls to libSceFreeType, following the bundled FreeType 2.13.3 (ftmm.c):
FT_Get_MM_Var,FT_Done_MM_Var,FT_Set_Var_Design_Coordinates,FT_Get_Var_Design_Coordinates,FT_Set_Var_Blend_Coordinates,FT_Get_Var_Blend_Coordinates,FT_Set_MM_Blend_Coordinates,FT_Set_MM_Design_CoordinatesandFT_Get_Multi_Master.FT_FixedandFT_Longarrays element by element, keep the native argument checks (including a zero count with a non-null array and the zero padding of a long array), publish the result into the guest array for the getters, and refresh the guest face after the setters because they change the face flags.FT_Get_MM_VarandFT_Get_Multi_Masterhand the guest the native structures:FT_MM_Varand its axes and styles are returned as the native allocation (released withFT_Done_MM_Varon the same library), andFT_Multi_Masteris copied. Their public layouts match the console's LP64 ones only with a 64-bitFT_Long, so on a host with a 32-bitFT_Long(Windows) they throw for a registered face, and a coordinate outside the hostFT_Fixedrange throws there too.Commits: for each function in turn, in the order above, the implementation, its test and its debt entry.
Tested
Linux x86-64, GCC, full CMake build (Ninja, Release).
guest_freetype_variationsuses a minimal variable TrueType fixture (onewghtaxis with anfvarand agvartable) next to a plain one and compares every call with a native face: the axis data and named-style counts returned byFT_Get_MM_Var, repeated create/release, design and blend coordinates set and read back for in-range, out-of-range and negative values with zero, one and two coordinates, the face flags after each setter, the MM-specific setters andFT_Get_Multi_Masteron variable and plain faces, and the null face, null array and null library cases. The host CPU (Xeon E5-1620 v2) fails the startup CPU-feature gate, so I ran the test at each of the nine stages with that check disabled in a local, uncommitted edit; all exit 0. Windows was not run.tools/check_conventions.pyandgit diff --checkpass. No title or GPU involved.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-11-02T04:57:45Z.
Review: COMMENTED
Reviewed — test requests done, debt counts still open
The variation test no longer asserts the LP64 throws, but the two overlapping provider lists and stale counts in the Ot debt doc are still on this head.
What I ran
Live head
c14e2ca9dc566020eea40557f7518f5f0ba1bab3(matches batch).gh pr viewfor mergeability andstatusCheckRollup;gh apireads of comments;git show <head>:<path>onGuestFreeTypeVariations.cppandlibSceFreeTypeOt.md; agrepcount onExport.cpp. Nothing was built or run.Results
Findings
GuestFreeTypeVariations.cpp:91-93now compares against the native reference on a null face and returns.:243skips the multi-master loop under!kHostLong64.libSceFreeTypeOt.md:3and:5are two provider lists.:4says 136 and:6says 129sceFreeTypeOtUnknown_*exports.Export.cpphas 120 unique names at head, matching the reviewer's 120. The reviewer asks to merge the lists, keep both main's stroker names and this PR's variation names, and replace the counts with the real number or omit it.Sources
github.com/boykopovar/AnyPS5@c14e2ca9dc/core/libs/tests/GuestFreeTypeVariations.cpp (L91-L93)github.com/boykopovar/AnyPS5@c14e2ca9dc/core/libs/tests/GuestFreeTypeVariations.cpp (L243)github.com/boykopovar/AnyPS5@c14e2ca9dc/docs/dev/debt/libSceFreeTypeOt.md (L3-L6)Not verified
guest_freetype_variationsandpublic_headers: not run, no build.