Skip to content

feat(libSceFreeType): implement FT_Select_Size - #9384

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Ondra97:codex/feat-freetype-select-size
Oct 25, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Ondra97:codex/feat-freetype-select-size

Conversation

@Ondra97

@Ondra97 Ondra97 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Add FT_Select_Size to the existing LP64 guest FreeType bridge so callers can select an advertised bitmap strike. The adapter maps the guest face to the native face, preserves FreeType's error precedence and publishes the resulting size metrics without refreshing unrelated guest face or glyph records.

The name and NID LlM3ydj7W1s are in the PS5 3.20 inventory. The signature and selection behavior follow bundled FreeType 2.13.3. Console ABI and errors remain unverified and are recorded in debt. No other open PR implements this export. The current overlap scan found adjacent declarations and independent FreeType features in #9550, #10604 and #10606; #9848 touches the same debt file for macOS native-symbol visibility. Retain each distinct change during later merges.

Tested

Rebased on upstream main 941ace5f342c24c84b0712b8db0a75e0232bc44d; tested PR head 815fc413eac20cc21973d62920ed122b5499b5e5. Windows 11 Pro 10.0.26300, Ryzen 9 7900X, 31.7 GiB RAM, WinLibs MinGW-w64 GCC 15.2.0 UCRT, Ninja, Release, BUILD_TESTING=ON, pinned bundled dependencies. The tests used the CPU.

  • cmake --build <build> --target libSceFreeType guest_freetype_tests guest_freetype_bitmap_tests guest_freetype_request_size_tests guest_freetype_outline_tests guest_freetype_outline_mutations_tests guest_freetype_charmap_tests guest_freetype_charmap_info_tests guest_freetype_face_info_tests guest_freetype_names_tests guest_freetype_sfnt_names_tests guest_freetype_list_tests guest_font_tests guest_system_font_tests guest_font_writing_line_tests font_face_lifetime_tests --parallel 10: the production FreeType library and focused fixtures built successfully without a source overlay.
  • ctest --test-dir <build> -R '^(guest_freetype.*|guest_.*font.*|font_.*)$' --output-on-failure --no-tests=error: 17/17 passed, zero skips. The integrated guest_freetype test reported 26 native request comparisons and 18 bitmap glyph comparisons for FT_Select_Size using generated bitmap fonts.
  • ctest --test-dir <build> -R '^public_headers($|_compile_)' -j 8 --output-on-failure --no-tests=error: 65/65 passed. FT_Select_Size now has its sole export declaration in public Api.hpp; the integrated test uses it and a typed GuestLibrary* parameter. The production export body is unchanged from the old hosted PR.
  • python tools/check_test_registration.py <build>, python tools/check_conventions.py --base origin/main, python tools/check_main_sync.py --base origin/main --strict, and git diff origin/main...HEAD --check: passed. python tools/pr_overlap.py --branch codex/pr9384-rebase-20261025 --repo boykopovar/AnyPS5 --jobs 12 completed; the only same-export match was this PR's old head. feat(libSceFreeType): manage multiple size objects #9550, feat(libSceFreeType): implement FT_Open_Face for memory and path sources #10604 and feat(libSceFreeType): implement FT_Done_Library and FT_Reference_Library #10606 add different FreeType features, and fix(libSceFreeType): preserve helpers through NID patching #9848 changes macOS visibility plus a separate debt entry.

The missing-feature baseline lacks FT_Select_Size_nid_postfix. The earlier negative control that removed SyncSize failed the metric comparison, but was not repeated on this head. The complete all-target build, patched-libraries loader, packaged PRX NID inspection, console probe and title run were not performed on this rebased head. Console compatibility remains unverified as recorded in debt.

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: none
  • 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 (941ace5 → 815fc41)

➖ System libraries: 48.86% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceFreeType FT_Select_Size_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libSceFreeType 52/53 (98.11%) 53/54 (98.15%) +0.03 pp

@MarcZX10 MarcZX10 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation and synthetic bitmap-strike coverage are well scoped, and I found no exact open PR or issue for FT_Select_Size. The head is 472 commits behind current main (d6eafa54d0464258574fd2f71889754d05a5bc93). The merge-tree with current main is clean; please rebase/update and refresh checks before merge. ## Checks observed - Local python3 tools/check_conventions.py --base upstream/main: passed. - Local git diff --check upstream/main...refs/review/9384: passed. - Local Linux guest_freetype_tests target: built and linked. - Local guest_freetype runtime: aborted before assertions because this host lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA. No local runtime pass is claimed. - The PR reports Windows 11 native-FreeType comparisons, negative controls, and 9/9 focused tests. Those runs were not reproduced locally. Existing hosted eligibility, conventions, intake, labels and report checks passed; product build jobs were skipped.

I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.

@Ondra97 Ondra97 closed this Oct 22, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

I’ve noticed that my earlier request to hold this PR based on #5239 was unnecessary. It’s fine to keep submitting PRs; maintainers will handle them in due course. Please disregard that request.

@Ondra97 Ondra97 reopened this Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 10604 docs/dev/debt/libSceFreeType.md L20
PR 10606 core/libs/prx/libSceFreeType/Export.cpp L116
docs/dev/debt/libSceFreeType.md L20

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 9465 docs/dev/debt/libSceFreeType.md
PR 9848 docs/dev/debt/libSceFreeType.md

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@Ondra97
Ondra97 force-pushed the codex/feat-freetype-select-size branch from 8e7f564 to 95b67e2 Compare October 23, 2026 03:22
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@Ondra97
Ondra97 force-pushed the codex/feat-freetype-select-size branch from 95b67e2 to 815fc41 Compare October 25, 2026 02:06
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@adriadam10 adriadam10 self-assigned this Oct 25, 2026
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 25, 2026 12:30

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit 18424d6 into boykopovar:main Oct 25, 2026
11 of 12 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff against the PR body: the export follows the FT_Set_Pixel_Sizes pattern, the single declaration is in the public Api.hpp, and the debt entry is in place. The new test compares error codes, size metrics and rendered bitmap-strike glyphs with native FreeType (null face, invalid and extreme indices, two generated BDF fonts) and could not pass without the export. The earlier rebase request is met; merged.

@Ondra97
Ondra97 deleted the codex/feat-freetype-select-size branch October 25, 2026 20:46
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.

3 participants