Skip to content

feat(libSceFreeType): check outlines and query control bounds - #9064

Merged
1 commit merged into
boykopovar:mainfrom
santhoshkumar-dev:codex/freetype-outline-queries
Oct 23, 2026
Merged

1 commit merged into
boykopovar:mainfrom
santhoshkumar-dev:codex/freetype-outline-queries

Conversation

@santhoshkumar-dev

@santhoshkumar-dev santhoshkumar-dev commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Add FT_Outline_Check and FT_Outline_Get_CBox to the guest FreeType bridge. Contour validation uses the bundled library with an explicit host record; control bounds read guest 64-bit coordinates directly, avoiding Windows FT_Pos narrowing. Null arguments, empty outlines and all control points follow the public source.

Names and NIDs are present in the PS5 3.20 inventory. Behavior comes from bundled FreeType 2.13.3 and its public outline layout. Console signatures, count signedness and errors remain unverified and are recorded in debt.

Open, closed and merged PR searches found no implementation of these two exports. The earlier #8247 debt conflict is resolved by rebasing onto its merged implementation. #8286 still shares the CMake insertion; merge #8286 first. There are no shared exports.

Tested

Windows 11 x64, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, BUILD_TESTING=ON.

  • cmake --build build --target libs guest_freetype_outline_tests guest_freetype_tests guest_freetype_charmap_tests -j6 passed. The three registered tests passed (0.25 / 0.12 / 0.34 s).
  • The outline regression compares more than 4,000 small contour/count combinations with native FreeType and checks full unsigned 16-bit counts and endpoints, including 65,535 points and 65,535 contours. It compares native control bounds for empty/single/mixed/extreme-32-bit inputs, ignores unrelated contour/tag data as the source does, and checks full signed-64-bit extrema independently of Windows' native coordinate width. Output guards and null arguments are covered.
  • After adding the maximum-contours case, guest_freetype_outline passed in 0.15 s. Compiled source mutations that truncate coordinates to 32 bits or reject counts above 32,767 fail the regression.
  • Strict -Wall -Wextra -Werror checks and repository conventions passed. The packaged PRX contains C4a3dGgs+Cc and 8ZxmGwESvSQ.

Rebased onto main 3e91c8edf5; all system libraries rebuilt and the three registered tests passed again (0.14 / 0.07 / 0.07 s).

Historical build limitation (2026-10-21): the default Windows build on the stated base failed at ImageArrayWindowPastLayerLimit.cpp because static alignment 65536 exceeded MinGW COFF's maximum 8192. Merged #8310 fixes that declaration; this is no longer a current-main blocker. The library/test results above retain their stated PR head and base.

No title, PS5 hardware or Linux runtime was tested.

Compatibility validation (2026-10-21): temporarily combined this PR with #8247, #8286, #8289, #9045, #9054 and the charmap-metadata follow-up on main 3e91c8edf5. All system libraries built and all seven FreeType tests passed. The C++ changes merged cleanly; temporary CMake/debt resolutions were used only for this local compatibility check and are not published.

Rebase audit (2026-10-21): rebased onto main d099bc6cd8, including the now-merged #8247 and #8289. All system libraries built. A temporary combination of the seven remaining FreeType branches passed all nine tests (0.07 / 0.07 / 0.06 / 0.06 / 0.16 / 0.04 / 0.06 / 0.06 / 0.05 s); all seven branches passed conventions. Temporary integration commits were not published.

Merge coordination update (2026-10-23): the #8558 overlap is a shared debt insertion only. Agreed order is #8558 before #9064, while retaining the existing #8286 order and both debt entries. Filip722 confirmed this order; this is not an implementation dependency. The agreed helper order before #9588 remains.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: feat(libSceFreeType): copy and convert guest bitmaps #8286, feat(libSceFreeType): implement FT_Get_Kerning #8558 (shared debt insertion; agreed merge order)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Progress report (2f161d4 → 9544a3e)

📈 System libraries: 42.43% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceFreeType FT_Outline_Check_nid_postfix
libSceFreeType FT_Outline_Get_CBox_nid_postfix

@santhoshkumar-dev
santhoshkumar-dev force-pushed the codex/freetype-outline-queries branch from 298b96d to 9544a3e Compare October 21, 2026 12:28
@github-actions github-actions Bot added build docs prx and removed needs rebase Conflicts with main, rebase needed labels Oct 21, 2026
@Ondra97

Ondra97 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

I opened #9588 for FT_Glyph_Get_CBox. I declared #9064 as an implementation dependency and reuse its existing LP64 FT_Outline_Get_CBox adapter unchanged. Merge this helper PR first; the new query uses it for retained outline glyphs.

@santhoshkumar-dev

Copy link
Copy Markdown
Contributor Author

Confirmed: merge #9064 before #9588. The LP64 FT_Outline_Get_CBox helper here is the shared implementation for the retained-outline query; retain one copy of the helper and its existing test, alongside the distinct glyph-query implementation and regression.

@santhoshkumar-dev

Copy link
Copy Markdown
Contributor Author

@Filip722 I rechecked the overlap notice with #8558 while auditing our open PR feedback. Our #9064 -> #9069 -> #9075 -> #9090 chain adds different exports; the kerning overlap is the shared debt insertion only.

I propose #8558 before #9064, followed by #9069 -> #9075 -> #9090, retaining both kerning and outline debt entries. #9064 also already lists #8286 for its separate merge order. Please confirm that order; I can then add #8558 to #9064's Depends on line. There is no kerning implementation dependency. #9588 already declares the relevant branches for its helper/merge order.

@Filip722

Copy link
Copy Markdown
Contributor

Confirmed from the #8558 side: #8558 before #9064, followed by #9069 → #9075 → #9090, while preserving #9064’s existing #8286 merge order. Please add #8558 to the Depends on line for merge coordination. The overlap is only the shared debt insertion; retain both kerning and outline entries.

@santhoshkumar-dev

Copy link
Copy Markdown
Contributor Author

Recorded the confirmed order: Depends on now lists both #8286 and #8558. The downstream #9069 -> #9075 -> #9090 chain retains that order, with both kerning and outline debt entries preserved.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 9848 core/libs/prx/libSceFreeType/CMakeLists.txt
docs/dev/debt/libSceFreeType.md

@oneandonlydean oneandonlydean closed this pull request by merging all changes into boykopovar:main in b3d9852 Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants