feat(libSceFreeType): query glyph control boxes #9588

Merged
Ondra97 merged 3 commits from upstream-pr/9588 into main 2026-11-06 19:00:16 +00:00
Ondra97 commented 2026-10-22 03:30:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-22T03:30:49Z.


What

Add FT_Glyph_Get_CBox (NID avLzN0tTxLI) for registered bitmap and outline glyphs. Callers can query unscaled, grid-fitted, truncated and integer-pixel bounds, including after closing the original face or copying the glyph.

Read the published guest geometry: outline queries reuse the existing LP64 FT_Outline_Get_CBox adapter, while bitmap queries use the current bearings and dimensions. Preserve signed pixel shifts, modular ceiling and uint32 bitmap-dimension multiplication before widening. Null outputs do not inspect the glyph; null glyph/class inputs clear the output. Foreign storage/classes and unsupported overflowing bitmap bearings throw. Console ABI and rounding equivalence remain recorded in library debt.

The name/NID follows the pinned PS5 3.20 inventory. The arithmetic follows FreeType 2.13.3 ftglyph.c and its pixel macros.

Rebased onto main 1da78eb048ddada5083efca424a4f7ed9728123a. Retain all current main APIs, declarations, build registration and tests. Glyph.cpp and GuestFreeTypeGlyph.cpp remain byte-identical to the previous submitted source. The diff contains six files. The OpenType provider alias keeps its NID and throws because its provider-specific ABI remains unverified; its debt lists all current provider names and 47 remaining unknown helpers, matching definitions and registrations.

The implementation prerequisites and the former documentation-order dependencies #10582 and #10591 are merged into main. No open prerequisites remain.

Tested

November 6, 2026 (Europe/Prague): main base 1da78eb048ddada5083efca424a4f7ed9728123a, submitted head 388ab70e2caaa1020b4d8cbac37bd5320daac3fc.

Windows 11 Pro 10.0.26300; AMD Ryzen 9 7900X (AVX2); 31.7 GiB RAM; NVIDIA GeForce RTX 4070 Ti SUPER present, with no GPU qualification claimed. WinLibs GCC 15.2.0 r7 UCRT; Ninja Release; BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON, current main's pinned bundled dependencies, including native FreeType 2.15.0.

The complete production relinker/libraries and all 67 selected fixture targets build successfully. All 154 selected CTests pass, with zero failures or skips: 89 font/FreeType/library cases and 65 public-header audit/compilation cases. Each test completes below 30 seconds.

guest_freetype_glyph executes 7,707 native CBox comparisons and 16 LP64 expectations. The public-header audit verifies 407 libraries and 30,744 exports with unique declarations and umbrella coverage; all 407 patched libraries load successfully. objdump -p confirms avLzN0tTxLI and Dr3F3qrSQ2c in both packaged FreeType libraries. Unknown-provider definitions and registrations both equal 47, compared with 48 on main.

Glyph.cpp remains blob 6c6f89bf5fde6a53e2e95b2779d2feb2d572237a; GuestFreeTypeGlyph.cpp remains blob 265ddf3d5eb1e18d8f192f61fbe131576479165a. The rebase retains current main's provider APIs and regressions. Conventions and current-main whitespace checks pass. No full CTest suite, Linux/macOS rerun, title or console run was performed for this revision.

Reproduction commands from the PR checkout
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
$targets = @(
    'font_face_lifetime_tests', 'font_render_surface_tests', 'guest_cairo_font_options_tests',
    'guest_font_ft_backoff_tests', 'guest_font_graphics_tests', 'guest_font_gs_agc_tests',
    'guest_font_metrics_tests', 'guest_font_outline_profile_tests', 'guest_font_rebind_renderer_tests',
    'guest_font_render_characters_tests', 'guest_font_renderer_lifecycle_tests', 'guest_font_scissor_tests',
    'guest_font_style_frame_tests', 'guest_font_style_information_tests', 'guest_font_tests',
    'guest_font_vertical_layout_tests', 'guest_font_words_tests', 'guest_font_writing_line_tests',
    'guest_font_writing_metrics_tests', 'guest_fontconfig_sets_tests', 'guest_freetype_advances_tests',
    'guest_freetype_bitmap_embolden_tests', 'guest_freetype_bitmap_init_tests', 'guest_freetype_bitmap_tests',
    'guest_freetype_build_info_tests', 'guest_freetype_corner_tests', 'guest_freetype_curve_bounds_tests',
    'guest_freetype_face_compat_tests', 'guest_freetype_face_info_tests', 'guest_freetype_glyph_tests',
    'guest_freetype_charmap_info_tests', 'guest_freetype_charmap_tests', 'guest_freetype_lcd_filter_tests',
    'guest_freetype_list_tests', 'guest_freetype_memory_record_tests', 'guest_freetype_module_management_tests',
    'guest_freetype_module_properties_tests', 'guest_freetype_names_tests', 'guest_freetype_ol_module_tests',
    'guest_freetype_ot_constants_tests', 'guest_freetype_ot_memory_tests', 'guest_freetype_ot_raccess_tests',
    'guest_freetype_ot_tests', 'guest_freetype_outline_border_tests', 'guest_freetype_outline_mutations_tests',
    'guest_freetype_outline_storage_tests', 'guest_freetype_outline_tests', 'guest_freetype_outline_transform_tests',
    'guest_freetype_pfr_null_face_tests', 'guest_freetype_pfr_tests', 'guest_freetype_postscript_info_tests',
    'guest_freetype_request_size_tests', 'guest_freetype_sfnt_names_tests', 'guest_freetype_sfnt_tests',
    'guest_freetype_slot_own_bitmap_tests', 'guest_freetype_slot_synthesis_tests', 'guest_freetype_stream_tests',
    'guest_freetype_stroker_outputs_tests', 'guest_freetype_stroker_tests', 'guest_freetype_subglyph_tests',
    'guest_freetype_tests', 'guest_freetype_track_kerning_tests', 'guest_freetype_variant_tests',
    'guest_freetype_vector_polar_tests', 'guest_outline_bounds_extents_tests', 'guest_system_font_tests',
    'patched_libraries_tests'
)
cmake --build build --target relinker libs @targets --parallel 4
ctest --test-dir build -R '^(guest_freetype.*|guest_.*font.*|font_.*|guest_outline_bounds_extents|patched_libraries|public_headers.*)$' -j 4 -V --no-tests=error
python tools/check_conventions.py --base origin/main
git diff --check origin/main...HEAD

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4961661613 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-10-22T03:30:49Z. --- ### What Add `FT_Glyph_Get_CBox` (NID `avLzN0tTxLI`) for registered bitmap and outline glyphs. Callers can query unscaled, grid-fitted, truncated and integer-pixel bounds, including after closing the original face or copying the glyph. Read the published guest geometry: outline queries reuse the existing LP64 `FT_Outline_Get_CBox` adapter, while bitmap queries use the current bearings and dimensions. Preserve signed pixel shifts, modular ceiling and uint32 bitmap-dimension multiplication before widening. Null outputs do not inspect the glyph; null glyph/class inputs clear the output. Foreign storage/classes and unsupported overflowing bitmap bearings throw. Console ABI and rounding equivalence remain recorded in library debt. The name/NID follows the pinned [PS5 3.20 inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceFreeTypeOt.c). The arithmetic follows [FreeType 2.13.3 ftglyph.c](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftglyph.c) and its [pixel macros](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/include/freetype/internal/ftobjs.h). Rebased onto main `1da78eb048ddada5083efca424a4f7ed9728123a`. Retain all current main APIs, declarations, build registration and tests. `Glyph.cpp` and `GuestFreeTypeGlyph.cpp` remain byte-identical to the previous submitted source. The diff contains six files. The OpenType provider alias keeps its NID and throws because its provider-specific ABI remains unverified; its debt lists all current provider names and 47 remaining unknown helpers, matching definitions and registrations. The implementation prerequisites and the former documentation-order dependencies #10582 and #10591 are merged into main. No open prerequisites remain. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> November 6, 2026 (Europe/Prague): main base `1da78eb048ddada5083efca424a4f7ed9728123a`, submitted head `388ab70e2caaa1020b4d8cbac37bd5320daac3fc`. Windows 11 Pro 10.0.26300; AMD Ryzen 9 7900X (AVX2); 31.7 GiB RAM; NVIDIA GeForce RTX 4070 Ti SUPER present, with no GPU qualification claimed. WinLibs GCC 15.2.0 r7 UCRT; Ninja Release; `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`, current main's pinned bundled dependencies, including native FreeType 2.15.0. The complete production relinker/libraries and all 67 selected fixture targets build successfully. All **154 selected CTests pass**, with zero failures or skips: 89 font/FreeType/library cases and 65 public-header audit/compilation cases. Each test completes below 30 seconds. `guest_freetype_glyph` executes **7,707 native CBox comparisons and 16 LP64 expectations**. The public-header audit verifies 407 libraries and 30,744 exports with unique declarations and umbrella coverage; all 407 patched libraries load successfully. `objdump -p` confirms `avLzN0tTxLI` and `Dr3F3qrSQ2c` in both packaged FreeType libraries. Unknown-provider definitions and registrations both equal 47, compared with 48 on main. `Glyph.cpp` remains blob `6c6f89bf5fde6a53e2e95b2779d2feb2d572237a`; `GuestFreeTypeGlyph.cpp` remains blob `265ddf3d5eb1e18d8f192f61fbe131576479165a`. The rebase retains current main's provider APIs and regressions. Conventions and current-main whitespace checks pass. No full CTest suite, Linux/macOS rerun, title or console run was performed for this revision. <details> <summary>Reproduction commands from the PR checkout</summary> ```powershell cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON $targets = @( 'font_face_lifetime_tests', 'font_render_surface_tests', 'guest_cairo_font_options_tests', 'guest_font_ft_backoff_tests', 'guest_font_graphics_tests', 'guest_font_gs_agc_tests', 'guest_font_metrics_tests', 'guest_font_outline_profile_tests', 'guest_font_rebind_renderer_tests', 'guest_font_render_characters_tests', 'guest_font_renderer_lifecycle_tests', 'guest_font_scissor_tests', 'guest_font_style_frame_tests', 'guest_font_style_information_tests', 'guest_font_tests', 'guest_font_vertical_layout_tests', 'guest_font_words_tests', 'guest_font_writing_line_tests', 'guest_font_writing_metrics_tests', 'guest_fontconfig_sets_tests', 'guest_freetype_advances_tests', 'guest_freetype_bitmap_embolden_tests', 'guest_freetype_bitmap_init_tests', 'guest_freetype_bitmap_tests', 'guest_freetype_build_info_tests', 'guest_freetype_corner_tests', 'guest_freetype_curve_bounds_tests', 'guest_freetype_face_compat_tests', 'guest_freetype_face_info_tests', 'guest_freetype_glyph_tests', 'guest_freetype_charmap_info_tests', 'guest_freetype_charmap_tests', 'guest_freetype_lcd_filter_tests', 'guest_freetype_list_tests', 'guest_freetype_memory_record_tests', 'guest_freetype_module_management_tests', 'guest_freetype_module_properties_tests', 'guest_freetype_names_tests', 'guest_freetype_ol_module_tests', 'guest_freetype_ot_constants_tests', 'guest_freetype_ot_memory_tests', 'guest_freetype_ot_raccess_tests', 'guest_freetype_ot_tests', 'guest_freetype_outline_border_tests', 'guest_freetype_outline_mutations_tests', 'guest_freetype_outline_storage_tests', 'guest_freetype_outline_tests', 'guest_freetype_outline_transform_tests', 'guest_freetype_pfr_null_face_tests', 'guest_freetype_pfr_tests', 'guest_freetype_postscript_info_tests', 'guest_freetype_request_size_tests', 'guest_freetype_sfnt_names_tests', 'guest_freetype_sfnt_tests', 'guest_freetype_slot_own_bitmap_tests', 'guest_freetype_slot_synthesis_tests', 'guest_freetype_stream_tests', 'guest_freetype_stroker_outputs_tests', 'guest_freetype_stroker_tests', 'guest_freetype_subglyph_tests', 'guest_freetype_tests', 'guest_freetype_track_kerning_tests', 'guest_freetype_variant_tests', 'guest_freetype_vector_polar_tests', 'guest_outline_bounds_extents_tests', 'guest_system_font_tests', 'patched_libraries_tests' ) cmake --build build --target relinker libs @targets --parallel 4 ctest --test-dir build -R '^(guest_freetype.*|guest_.*font.*|font_.*|guest_outline_bounds_extents|patched_libraries|public_headers.*)$' -j 4 -V --no-tests=error python tools/check_conventions.py --base origin/main git diff --check origin/main...HEAD ``` </details> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-22 03:43:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T03:43:37Z.

Review: CHANGES_REQUESTED


The new CBox calculation tracks the pinned FreeType 2.13.3 source for the registered outline and bitmap classes: it uses guest outline points, the bitmap bearing/dimension formulas, the same floor/ceiling and arithmetic-shift behavior, and leaves other modes unscaled. The tests exercise those formulas against the pinned implementation and add full-width LP64 cases. The limitations in the debt entry are appropriately explicit.

The merge-order checklist needs correction before approval. #9064 is explicitly listed as an implementation dependency, but its own checklist says it depends on #8286, while this PR only lists #9064. Please include the dependency chain (at least #8286, unless its relevant changes have already landed) so the PR cannot be merged before its prerequisite. The description also asks to merge after #8558 and #9090 but the checklist marks #8558 and #9090 as dependencies along with #9574; that is appropriate if they must land first, but please verify #9090's dependency chain is represented too (it depends on #9075, which in turn has its own chain). The stated shared insertions in CMake, Outline.cpp, tests and debt should remain coordinated with those PRs during rebases.

I reviewed the box calculation and direct tests but did not run this PR's local suite. Eligibility, conventions, intake, labels and report checks pass; hosted product build/test jobs are skipped. The focused Windows build, tests and 7,707 comparisons in the description are author-reported, including an overlay-qualified full build rather than a clean-main full build.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609005629 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588#pullrequestreview-5609005629). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T03:43:37Z. **Review:** CHANGES_REQUESTED --- The new CBox calculation tracks the pinned FreeType 2.13.3 source for the registered outline and bitmap classes: it uses guest outline points, the bitmap bearing/dimension formulas, the same floor/ceiling and arithmetic-shift behavior, and leaves other modes unscaled. The tests exercise those formulas against the pinned implementation and add full-width LP64 cases. The limitations in the debt entry are appropriately explicit. The merge-order checklist needs correction before approval. #9064 is explicitly listed as an implementation dependency, but its own checklist says it depends on #8286, while this PR only lists #9064. Please include the dependency chain (at least #8286, unless its relevant changes have already landed) so the PR cannot be merged before its prerequisite. The description also asks to merge after #8558 and #9090 but the checklist marks #8558 and #9090 as dependencies along with #9574; that is appropriate if they must land first, but please verify #9090's dependency chain is represented too (it depends on #9075, which in turn has its own chain). The stated shared insertions in CMake, `Outline.cpp`, tests and debt should remain coordinated with those PRs during rebases. I reviewed the box calculation and direct tests but did not run this PR's local suite. Eligibility, conventions, intake, labels and report checks pass; hosted product build/test jobs are skipped. The focused Windows build, tests and 7,707 comparisons in the description are author-reported, including an overlay-qualified full build rather than a clean-main full build.
jotitadev commented 2026-10-22 03:50:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T03:50:10Z.

Review: COMMENTED


Linux run of this change, since the description lists only Windows 11.

Machine: Linux x86_64, i7-8700 (6 cores / 12 threads), Ubuntu 26.04, GCC 15.2, Release, BUILD_TESTING=ON, bundled dependencies. Head 3da7524c0 merged --no-commit onto main 6ef5a1c4c (clean); the #9465 dependency diff rides along in the aggregate until it merges.

  • Build ok. guest_freetype_glyph, guest_freetype_outline, guest_freetype and guest_freetype_charmap all pass. python tools/check_conventions.py --base origin/main reports no errors.
  • Red→green on Linux, exercising the actual bounds read rather than the link-only control: replacing the outline branch FT_Outline_Get_CBox_nid_postfix(&owner.outline.outline, box) with *box = {} (keeping the test) aborts guest_freetype_glyph at FreeType glyph check failed at line 502, so the query really reads the published guest geometry and the test catches a wrong result, not just a missing symbol. guest_freetype_outline stays green under that mutation since it checks the adapter directly, which lines up with the PR reusing #9064's FT_Outline_Get_CBox for outline points.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609041495 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588#pullrequestreview-5609041495). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-22T03:50:10Z. **Review:** COMMENTED --- Linux run of this change, since the description lists only Windows 11. Machine: Linux x86_64, i7-8700 (6 cores / 12 threads), Ubuntu 26.04, GCC 15.2, Release, `BUILD_TESTING=ON`, bundled dependencies. Head `3da7524c0` merged `--no-commit` onto `main` `6ef5a1c4c` (clean); the #9465 dependency diff rides along in the aggregate until it merges. - Build ok. `guest_freetype_glyph`, `guest_freetype_outline`, `guest_freetype` and `guest_freetype_charmap` all pass. `python tools/check_conventions.py --base origin/main` reports no errors. - Red→green on Linux, exercising the actual bounds read rather than the link-only control: replacing the outline branch `FT_Outline_Get_CBox_nid_postfix(&owner.outline.outline, box)` with `*box = {}` (keeping the test) aborts `guest_freetype_glyph` at `FreeType glyph check failed at line 502`, so the query really reads the published guest geometry and the test catches a wrong result, not just a missing symbol. `guest_freetype_outline` stays green under that mutation since it checks the adapter directly, which lines up with the PR reusing #9064's `FT_Outline_Get_CBox` for outline points. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-22 04:10:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:10:41Z.

Review: CHANGES_REQUESTED


Thank you for adding the independent Linux red/green report; it corroborates the guest-geometry branch and its regression test. The merge-order issue remains in the current checklist: #9064 depends on #8286, but this PR lists #9064 without #8286. Please include the unresolved prerequisite chain (at least #8286, unless it has landed) and verify the other dependency chains are still accurate against current open/merged states before approval. This prevents merging the CBox adapter/query before the code it reuses is available. Current hosted policy checks pass; product build/test jobs remain skipped. I did not run local tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609157741 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588#pullrequestreview-5609157741). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:10:41Z. **Review:** CHANGES_REQUESTED --- Thank you for adding the independent Linux red/green report; it corroborates the guest-geometry branch and its regression test. The merge-order issue remains in the current checklist: #9064 depends on #8286, but this PR lists #9064 without #8286. Please include the unresolved prerequisite chain (at least #8286, unless it has landed) and verify the other dependency chains are still accurate against current open/merged states before approval. This prevents merging the CBox adapter/query before the code it reuses is available. Current hosted policy checks pass; product build/test jobs remain skipped. I did not run local tests.
fogydes commented 2026-10-22 08:50:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-22T08:50:48Z.


Reviewed; verified the pieces that matter. The NID chain is correct: compute_nid("FT_Glyph_Get_CBox") returns avLzN0tTxLI, which is exactly the NID the PS5 3.20 libSceFreeTypeOt.c stub binds to FT_Glyph_Get_CBox. The mode arithmetic matches the bundled 2.13.3 semantics claim by claim: bitmap bounds are (left * 64, left*64 + width*64, top*64, top*64 - rows*64) with the multiplication kept 32-bit-modular before widening (the unsigned-dimension wrap case is pinned in the tests), >> 6 is arithmetic on the full 64-bit bounds for TRUNCATE/PIXELS, the GRIDFIT/PIXELS ceiling is the source's wrap-around floor/ceil grid fitting (the two-complement modular ceiling reproduces the FT_PIX_CEIL overflow case in ftobjs.h rather than diverging on huge negative coordinates), and any other mode value keeps unscaled bounds, which is what the outline/bitmap class implementations do for undocumented modes. Reading the bounds from the published guest geometry rather than the native backing glyph is the one non-obvious requirement here, and the body's negative-control (querying the native object fails the first nonempty outline comparison) proves the implementation actually does that. Null handling and the stricter Done/Copy checks line up with the debt entries, which are unusually complete about what's unverified (console ABI, rounding equivalence, the signed-multiply overflow throw where the bundled source is undefined).

Notes:

  1. The merge-base diff is dominated by the inherited #9465 glyph-registration machinery (FT_Get_Glyph/FT_Glyph_Copy/FT_Done_Glyph and the 707-line glyph test file) with original authorship — as the body says. Reviewers/mergers should treat the feature commit 3da7524c as the actual scope: the new export, its test additions and the debt entry.
  2. The FT_Outline_Check/FT_Outline_Get_CBox lines appearing in this diff are inherited #9064 code, not a second implementation of the CBox query — worth remembering during rebase so the two debt entries stay distinct, as the body itself instructs.
  3. The dependency chain (#9090 → #9075 → #9069 → #9064 → #8286, plus #9574/#9560/#9550 and #9465 → #9399) is all still open as of today, so merge order will matter for the shared insertions in Export.cpp/CMake — the overlap analysis is present and matches.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6336724699 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588#issuecomment-6336724699). Originally posted by [fogydes](https://github.com/fogydes) on 2026-10-22T08:50:48Z. --- Reviewed; verified the pieces that matter. The NID chain is correct: `compute_nid("FT_Glyph_Get_CBox")` returns `avLzN0tTxLI`, which is exactly the NID the PS5 3.20 `libSceFreeTypeOt.c` stub binds to `FT_Glyph_Get_CBox`. The mode arithmetic matches the bundled 2.13.3 semantics claim by claim: bitmap bounds are `(left * 64, left*64 + width*64, top*64, top*64 - rows*64)` with the multiplication kept 32-bit-modular before widening (the unsigned-dimension wrap case is pinned in the tests), `>> 6` is arithmetic on the full 64-bit bounds for TRUNCATE/PIXELS, the GRIDFIT/PIXELS ceiling is the source's wrap-around floor/ceil grid fitting (the two-complement modular ceiling reproduces the `FT_PIX_CEIL` overflow case in ftobjs.h rather than diverging on huge negative coordinates), and any other mode value keeps unscaled bounds, which is what the outline/bitmap class implementations do for undocumented modes. Reading the bounds from the published guest geometry rather than the native backing glyph is the one non-obvious requirement here, and the body's negative-control (querying the native object fails the first nonempty outline comparison) proves the implementation actually does that. Null handling and the stricter Done/Copy checks line up with the debt entries, which are unusually complete about what's unverified (console ABI, rounding equivalence, the signed-multiply overflow throw where the bundled source is undefined). Notes: 1. The merge-base diff is dominated by the inherited #9465 glyph-registration machinery (`FT_Get_Glyph`/`FT_Glyph_Copy`/`FT_Done_Glyph` and the 707-line glyph test file) with original authorship — as the body says. Reviewers/mergers should treat the feature commit `3da7524c` as the actual scope: the new export, its test additions and the debt entry. 2. The `FT_Outline_Check`/`FT_Outline_Get_CBox` lines appearing in this diff are inherited #9064 code, not a second implementation of the CBox query — worth remembering during rebase so the two debt entries stay distinct, as the body itself instructs. 3. The dependency chain (#9090 → #9075 → #9069 → #9064 → #8286, plus #9574/#9560/#9550 and #9465 → #9399) is all still open as of today, so merge order will matter for the shared insertions in `Export.cpp`/CMake — the overlap analysis is present and matches.
MarcZX10 commented 2026-10-22 10:11:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T10:11:34Z.

Review: CHANGES_REQUESTED


The implementation review is encouraging: the feature commit uses the registered guest geometry, matches the pinned FreeType bounds arithmetic, and has substantive regression coverage. The dependency chain is now described and the checklist includes the immediate prerequisites. I did not find a feature-specific correctness issue in the code I reviewed. One repository requirement remains before merge: the base is stale. This head is 51 commits behind current upstream/main. Please rebase or merge current main after the prerequisite order is settled, then rerun the focused tests and checks. Checks run on exact head bd1500ab868bfbd92dc0db926cc15cfcd58b9849: - git diff --check upstream/main...HEAD: passed. - python tools/check_conventions.py --base upstream/main --head HEAD: passed. - Built guest_freetype_glyph_tests, guest_freetype_outline_tests, guest_freetype_tests, and guest_freetype_charmap_tests with GCC 12.2 on Linux: passed. - Ran the four corresponding CTest cases: all four aborted during libkernel static initialization before reaching the test bodies because this host (Intel Xeon E5-1620 v2) lacks required PS5 instruction-set features, including AVX2. These are environment-blocked runs, not test assertion failures; I cannot report them as passing. - Hosted eligibility, labels, report and conventions checks pass on the latest run. Hosted Linux/Windows product build/test jobs are skipped, so no hosted product result is available. The earlier Windows results and independent Linux results in the description are useful author/reviewer reports. Please provide fresh focused test results after updating the base, on a host that meets the project's CPU requirements. I have left this as changes requested for the stale-base update and focused-test rerun only, not for a defect found in the CBox implementation. I withdraw the queue-based hold; it is fine to keep submitting PRs and they will be handled in due course.

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5612574685 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588#pullrequestreview-5612574685). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T10:11:34Z. **Review:** CHANGES_REQUESTED --- The implementation review is encouraging: the feature commit uses the registered guest geometry, matches the pinned FreeType bounds arithmetic, and has substantive regression coverage. The dependency chain is now described and the checklist includes the immediate prerequisites. I did not find a feature-specific correctness issue in the code I reviewed. One repository requirement remains before merge: the base is stale. This head is 51 commits behind current `upstream/main`. Please rebase or merge current `main` after the prerequisite order is settled, then rerun the focused tests and checks. Checks run on exact head `bd1500ab868bfbd92dc0db926cc15cfcd58b9849`: - `git diff --check upstream/main...HEAD`: passed. - `python tools/check_conventions.py --base upstream/main --head HEAD`: passed. - Built `guest_freetype_glyph_tests`, `guest_freetype_outline_tests`, `guest_freetype_tests`, and `guest_freetype_charmap_tests` with GCC 12.2 on Linux: passed. - Ran the four corresponding CTest cases: all four aborted during `libkernel` static initialization before reaching the test bodies because this host (Intel Xeon E5-1620 v2) lacks required PS5 instruction-set features, including AVX2. These are environment-blocked runs, not test assertion failures; I cannot report them as passing. - Hosted eligibility, labels, report and conventions checks pass on the latest run. Hosted Linux/Windows product build/test jobs are skipped, so no hosted product result is available. The earlier Windows results and independent Linux results in the description are useful author/reviewer reports. Please provide fresh focused test results after updating the base, on a host that meets the project's CPU requirements. I have left this as changes requested for the stale-base update and focused-test rerun only, not for a defect found in the CBox implementation. I withdraw the queue-based hold; it is fine to keep submitting PRs and they will be handled in due course. 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.
MarcZX10 commented 2026-10-28 22:24:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T22:24:26Z.

Review: CHANGES_REQUESTED


The glyph bounds implementation and tests remain consistent with the pinned FreeType 2.13.3 arithmetic, and the PR records the unsupported inputs and console uncertainty. The author reports Windows 19/19 focused tests on the latest head; hosted Windows, eligibility, conventions, labels, and report checks pass, while Linux product jobs are skipped. I did not run a local build.

The current overlap report identifies #10582 and #10591 in the same docs/dev/debt/libSceFreeTypeOt.md section. The checklist declares the implementation prerequisites #9465 and #9398, but it does not record an agreed landing order for those two current debt-file overlaps. Please compare the changes with both authors, agree which PR lands first, and add the order to the relevant Depends on checklists (or update the overlap analysis if the exact current heads are now disjoint). The prerequisite chain in this PR is otherwise explicit: #9465's #9399 prerequisite has merged, and #9398 declares no further dependency.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5690484764 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9588#pullrequestreview-5690484764). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T22:24:26Z. **Review:** CHANGES_REQUESTED --- The glyph bounds implementation and tests remain consistent with the pinned FreeType 2.13.3 arithmetic, and the PR records the unsupported inputs and console uncertainty. The author reports Windows 19/19 focused tests on the latest head; hosted Windows, eligibility, conventions, labels, and report checks pass, while Linux product jobs are skipped. I did not run a local build. The current overlap report identifies #10582 and #10591 in the same `docs/dev/debt/libSceFreeTypeOt.md` section. The checklist declares the implementation prerequisites #9465 and #9398, but it does not record an agreed landing order for those two current debt-file overlaps. Please compare the changes with both authors, agree which PR lands first, and add the order to the relevant `Depends on` checklists (or update the overlap analysis if the exact current heads are now disjoint). The prerequisite chain in this PR is otherwise explicit: #9465's #9399 prerequisite has merged, and #9398 declares no further dependency.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9588
No description provided.