feat(libSceFreeType): expose glyph-to-script maps #12680
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12680"
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 SnekPolylepis on 2026-10-29T01:44:23Z.
What
Implement
FT_Property_Getfor the autofitter'sglyph-to-script-mapproperty. The adapter translates the guest face to its native face and returns the 16-bit glyph map allocated by the bundled FreeType backend. Its lifetime is tied to the face. The setter returns the bundled backend's missing-property error. This replaces an unimplemented exception for callers that query the property.The carrier layout and behavior follow bundled FreeType 2.13.3. Console ABI, property availability and exact glyph classification are unverified and documented as debt.
Tested
GuestFreeType.cppcompile in a syntax-only check. Added a guest regression that compares the map and error behavior against native FreeType, but the complete CMake guest test has not been run on this branch.python tools/check_conventions.py --base origin/mainandgit diff --checkpass.tools/pr_overlap.pychecked 1,404 open PRs. A merge simulation with #12668 is clean. Three PRs (#9419, #9465, #10897) could not be automatically compared because their branches conflict with main; their shared debt file was manually checked and merges cleanly. The final debt-note placement changed after the scan.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 rooklz on 2026-10-29T03:37:44Z.
Review: APPROVED
Independent check on macOS arm64 (Apple clang, ASan+UBSan), head
cf9b7c6b39. This covers the macOS gap: the Linux lane was skipped and the body only lists Windows.Setup: a standalone harness that compiles this PR's
src/ModuleProperties.cppunchanged. It links against FreeType built from source at the submodule commit 42608f77f2 (2.13.3, ASan/UBSan). It reuses the realFaceOf(face->internal) and builds a minimalGuestFacearound each host face. A second, independentFT_Libraryserves as the native oracle.Differential: every face in every
.ttf/.ttc/.otfunder/System/Library/Fonts{,/Supplemental}was checked: 787 faces, 2,385,223 glyphs, 15,740 calls, 0 diffs. For each face:faceis left unchanged, andmap[0..num_glyphs)equals native.7).truetype,cff,Autofitterorautofittestill throwsNotImplemented. The match is exact and case-sensitive.Mutants (run on 5 fonts):
autofittermodule check dropped · map written at offset 0 · setter returns 0{}.af_property_sethas noglyph-to-script-mapbranch, so it returnsMissing_Propertybefore it readsvalue.Also checked:
check_conventions --base upstream/mainis clean, andgit merge-treewith the sibling #12668 (increase-x-height, same file) is clean.Nit, not blocking: #12668 puts its carrier in
GuestFreeType.hppwithstatic_asserts on size and offsets. This PR declaresGuestGlyphToScriptMaplocally in the .cpp, and the test declares its ownGuestMap. Moving the struct into the header next toGuestPropIncreaseXHeight, withstatic_assert(sizeof == 16 && offsetof(map) == 8), would let the test share the layout and keep the two carriers consistent.AI-assisted: yes