feat(libfreetype): implement bitmap and outline glyph creation #16497
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16497"
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 Noxy-HNR on 2026-11-06T22:40:27Z.
What
Implement
FT_New_Glyph(sZq9oSwMGSs) in libfreetype for bitmap and outline glyphs. The typed LP64 export calls the bundled FreeType through the existing libSceFreeType glyph registry, so new objects also work with the existing glyph copy and destruction APIs. Argument and unsupported-format errors preserve the output, native allocation failures clear it, and refused guest output writes returnFT_Err_Invalid_Argumentbefore allocating.The contract follows FreeType 2.15.0 ftglyph.c and the NID matches the public name database. Console ABI, version and allocation equivalence remain unverified. Accepted SVG/custom renderer classes remain unsupported and are recorded in the debt entry linked to
Glyph.cpp; no title unblock is claimed.The new native bridge and the existing bitmap-unregistration helper use C linkage so their
_nid_no_patchsuffix survives NID patching. A suffix inside an Itanium-mangled C++ name did not preserve the bridge export. Native clients rebuild against the updated declaration.Merge ordering follows #16394 and #16399. After those land, merge main, move the link/test registrations from
NewGlyph.cmakeinto the module CMakeLists added by #16394, preserve their independent implementations and rerun the affected tests. No unmerged code from those branches is included here. #9848 touches the same internal bridge declarations; preserve its other renames and this new helper when resolving that header. It does not implementFT_New_Glyph.Tested
Current verification (2026-11-07), head
0721e96fe3, merging maineed8517b31: Windows 11 x86-64, WinLibs MinGW GCC 15.2, Ninja, Release, full project configuration withBUILD_TESTING=ON,-j 18. Builtguest_legacy_freetype_new_glyph_fixture,guest_freetype_glyph_tests,guest_freetype_bitmap_init_testsandguest_freetype_bitmap_embolden_tests. Raw and NID new-glyph tests plus the glyph and bitmap regressions: 5/5 passed in each of three runs, none skipped. Final build confirmation exited 0. Current conventions, whitespace and public-header audit passed (407 libraries, 30,874 exports). The private patched fixture now separates configurations, regenerates its executable when the patcher changes and publishes patched outputs only after successful patching.Manual full-build dispatch for this head returned HTTP 403 (repository admin rights required). Automatic checks are tracked separately; skipped jobs are not passes. No new Linux, macOS, console or title runtime result is claimed.
Historical verification follows; older results retain their original heads and do not establish validation of the current head.
Windows 11 x86-64, WinLibs GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ON,-j 18. Current head includes mainee0d1204e3through a regular merge.guest_legacy_freetype_new_glyph, its NID variant,guest_freetype_glyph(including current main's glyph-box cases),guest_freetype_bitmap_initandguest_freetype_bitmap_embolden: 5/5 passed in each of 3 runs.FT_New_Glyphthrowing body in unmodified main6bf3a19b81; both variants fail at the explicit supported-behavior assertion, not module/symbol lookup.No standalone Linux, macOS, console or title run was performed for this final head. Earlier reviewer-supplied Linux/Windows combined-branch results are supplemental, not substituted for a final-head run.
Overlap preflight is recorded below before submission; shared declaration/debt/build edits require preserving each independent contribution. The checker fails closed on other unmergeable PRs, so those comparisons are reviewed manually rather than called a clean automatic pass.
Final pre-open
pr_overlap.pyrun: 1,834 open PR heads, 75 shared-file candidates, base1080643b1e. Exit 2 came from 27 unmergeable external comparisons; all were manually inspected from their merge bases: #5021, #7275, #8650, #9156, #9161, #9293, #9297, #9302, #9383, #10609, #10611, #10613, #10616, #10897, #12004, #12373, #12642, #13486, #14212, #14429, #14798, #15111, #15363, #15365, #15630, #15836, #15838. None addsFT_New_Glyph, its NID, the new helper or its test/fragment. The shared changes are independent test registrations, other FreeType APIs, debt entries or formatting. Explicit adjacent edits in #15408, #15439, #15442, #15444, #15447, #15468, #16394 and #16399 remain integration work; #9848 includes the same unregistration-linkage correction and broader bridge renames. Combined integration with those unmerged branches was not performed here.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)