feat(freetype): implement glyph mutation exports #18482
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18482"
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 B-Howell on 2026-11-11T17:52:54Z.
What
Implements the four existing FreeType glyph exports
FT_Glyph_To_Bitmap,FT_Glyph_Transform,FT_Glyph_StrokeandFT_Glyph_StrokeBorder(FreeTypeOt NIDsc1nbr8oSWlg,AVEEb57HhUw,0rKmI1ZbMAc,BBRhYfYBDgU) on top of the shared guest-glyph ownership registry and FreeType's own outline operations. The outline bridge copies guest point data into the native outline before each mutation, and glyph replacement keeps ownership consistent for both the destroy and retain cases. Get/Copy keep wide guest-coordinate values when they publish outlines, while mutation synchronization uses checked conversions.The regression fixture loads FreeType and FreeTypeOt as a matched raw pair and as a matched patched pair. It covers guest outline edits, mutation and replacement, ownership retention, destruction and invalid-pointer handling through the existing export NIDs. The four cross-library C-linkage host bridges carry the
_nid_no_patchsuffix in their declarations and definitions, so NID patching keeps the helper names in the patched pair without adding exports or changing the progress denominator.Tested
Head
d8c0b9e525f00acd10eb63a47c506eadc3431477(treebb2b58149686653df86e21367923564831f49ac5). It merges into currentmainf57c971559a8dcacdb7b090ad5f4a82b7633ea96without conflicts. Against that merge, the topic's changes stay limited to libSceFreeType, libSceFreeTypeOt, the new fixture and the two debt files.Windows (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips.
WSL Ubuntu (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips.
Failing control: the fixture alone (test-only commit
6aecda3111c83c6a4d7b25ac1c06de2360bcc6d6) fails on both matched provider pairs. Each returns 1 at the firstsceFreeTypeOtGlyphToBitmap_nid_no_patchmarker, with no crash or loader failure.tools/progress.py: four functions move from throwing to implemented; the denominator does not change.Head
ce1abd4132fc80f206f57355320857ffa661caf0mergesmain3b7f31fa700b0e9d46dac0d51344330225621bd3(after #18367) intod8c0b9e5and takes theFT_Glyph_Stroke_nid_postfixname inExport.cpp,libSceFreeTypeOt.hppand the fixture's raw-mode symbol. WSL Ubuntu (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips.tools/progress.pyagainst thatmain: still four functions from throwing to implemented (15069/39230 to 15073/39230), denominator unchanged. Windows was not rerun on this head because the Windows checkout lacks the ICU submodule.Head
e3f0f7643711b16063d22db1ab811202f22611e6mergesmaind2cea620f831acad16f265479e0fa2d8bf160c53(after #16497) intoce1abd41and adds a source-firstPublish(const GuestOutline&, const char*)overload inGlyph.cppthat forwards to the existing one, so #16497'sFT_New_Glyphcall compiles unchanged. WSL Ubuntu (native build): all four focused selectors passed 3/3 each,public_headerspassed, and #16497'sguest_legacy_freetype_new_glyphandguest_legacy_freetype_new_glyph_nidpassed 3/3 each, with zero skips. Windows was not rerun on this head.tools/pr_overlap.py --branchon this head against the open pull requests: 1966 open pull requests probed againstmainf57c9715. No other open pull request implements any of the four NIDs. #18367 renamed the0rKmI1ZbMAcstub toFT_Glyph_Stroke_nid_postfixand left it throwing. It has landed, and this branch adopted its name: the implementation now lives inFT_Glyph_Stroke_nid_postfix, and its declaration inlibSceFreeTypeOt.hppcarries the full signature. The tool could not merge ten pull requests into the base, so it could not compare them: #10611, #10897, #14212, #15052, #16122, #16497, #16823, #17715, #17776 and #17779. Their diffs at their current heads were compared by hand. #16497 addsFreeTypeNewGlyphinGlyph.cppwith the earlier source-firstPublishcall. It landed first, so this branch adds the four-line source-firstPublishoverload its call needs. Its textual conflict is in the debt files. The others implement or rename other FreeTypeOt exports. None adds or removes any of the four NIDs.Debt fragment
2c99586061: merged mainc3d38470e0cand moved this PR's debt edits intodocs/dev/debt/changes/codex-freetype-glyph-mutations-c340.md; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head.debt_fold.py --checkandcheck_conventions.py --base origin/mainpass. Documentation only, no build.Head
5b5816e6db5: ordinary merge ofmain01c550960a9into2c995860615. The only conflict was inlibSceFreeTypeOt.hpp: main implementedFT_New_GlyphSlot(typed declaration now ininclude/GlyphSlot.hpp), so the old untyped declaration is dropped and this PR's typedFT_Glyph_Stroke_nid_postfixdeclaration is kept. WSL Ubuntu (native build):guest_freetype_ot_glyph_mutationandguest_freetype_ot_glyph_slotpassed (3/3 ctest entries).debt_fold.py --checkandcheck_conventions.py --base origin/mainpass. Windows was not rerun on this head.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)Prepared with Codex; published by Claude Code.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-12T06:08:23Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d8c0b9e525:tools/check_conventions.pypassed;git diff --checkclean.guest_freetype_ot_glyph_mutation_testsbuilt cleanly.guest_freetype_ot_glyph_mutation,guest_freetype_ot_glyph_mutation_patched):core/libs/prx/libSceFreeType/include/Api.hpp,core/libs/prx/libSceFreeType/src/Glyph.cpp,core/libs/prx/libSceFreeTypeOt/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Generated withfooter from the description; the AI-assisted checkbox can stay.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T20:23:50Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
ce1abd4132:tools/check_conventions.pypassed;git diff --checkclean.guest_freetype_ot_glyph_mutation_testsbuilt cleanly.guest_freetype_ot_glyph_mutation,guest_freetype_ot_glyph_mutation_patched):core/libs/prx/libSceFreeType/include/Api.hpp,core/libs/prx/libSceFreeType/src/Glyph.cpp,core/libs/prx/libSceFreeTypeOt/Export.cpp,core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T20:23:50Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
ce1abd4132:tools/check_conventions.pypassed;git diff --checkclean.guest_freetype_ot_glyph_mutation_testsbuilt cleanly.guest_freetype_ot_glyph_mutation,guest_freetype_ot_glyph_mutation_patched):core/libs/prx/libSceFreeType/include/Api.hpp,core/libs/prx/libSceFreeType/src/Glyph.cpp,core/libs/prx/libSceFreeTypeOt/Export.cpp,core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:22:31Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e3f0f76437:tools/check_conventions.pypassed;git diff --checkclean.guest_freetype_ot_glyph_mutation_testsbuilt cleanly.guest_freetype_ot_glyph_mutation,guest_freetype_ot_glyph_mutation_patched):core/libs/prx/libSceFreeType/include/Api.hpp,core/libs/prx/libSceFreeType/src/Glyph.cpp,core/libs/prx/libSceFreeTypeOt/Export.cpp,core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T23:24:21Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
2c99586061:tools/check_conventions.pypassed;git diff --checkclean.guest_freetype_ot_glyph_mutation_testsbuilt cleanly.guest_freetype_ot_glyph_mutation,guest_freetype_ot_glyph_mutation_patched):core/libs/prx/libSceFreeType/include/Api.hpp,core/libs/prx/libSceFreeType/src/Glyph.cpp,core/libs/prx/libSceFreeTypeOt/Export.cpp,core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T13:45:26Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
5b5816e6db:tools/check_conventions.pypassed.guest_freetype_ot_glyph_mutation_testsbuilt cleanly.guest_freetype_ot_glyph_mutation,guest_freetype_ot_glyph_mutation_patched):core/libs/prx/libSceFreeType/include/Api.hpp,core/libs/prx/libSceFreeType/src/Glyph.cpp,core/libs/prx/libSceFreeTypeOt/Export.cpp,core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T04:37:22Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
f9aa2902ce7c33bf149ce9992d1008286fafb064. No commands or tests were run in this review; the test results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests were run in this review. I did not verify console prototypes, FreeType version equivalence, or console behavior; the debt entry also records these as unverified. No changed files were excluded. The description reports WSL test runs at earlier heads and says Windows was not rerun on the latest head.
To get this to a good state
Nothing is required.