feat(libSceFreeType): expose CID font metadata #9545
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9545"
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 Ondra97 on 2026-10-22T01:16:06Z.
What
Expose the three CID-font metadata queries through the existing guest-to-native face bridge:
FT_Get_CID_Registry_Ordering_SupplementPr3eI2uGgvUFT_Get_CID_Is_Internally_CID_Keyedp-LFZYbDPDUFT_Get_CID_From_Glyph_IndexNLwiYXdX5WUReturn the native registry/ordering/supplement, CID-keyed status and character-string-index/CID mapping, including the native errors and output initialization for unsupported or null faces. Optional and aliased output pointers retain the native behavior. Compile-time checks establish a one-byte
FT_Booland four-byteFT_Int/FT_UInt; registry and ordering strings remain owned by the corresponding native face.The names/NIDs match the pinned PS5 3.20 inventory. The contracts come from bundled ftcid.c, its CFF metadata service and the public CID API. Console ABI/version and metadata equivalence remain unverified and are recorded in library debt.
The regression creates its own small raw CFF fonts from INDEX/DICT primitives:
Adobe / Identity / 7maps character-string index 1 to CID 41; a second CID font uses different registry/ordering names, supplement 9 and CID 65535. Name-keyed CFF and TrueType fonts exercise the distinct unsupported/non-CID paths. No external font asset or new dependency is needed.The former merge-order predecessor #9538 is merged, together with #9309. The branch retains their outline-orientation and character-size implementation and tests. #9530 and #9574 are also merged; their Gasp and trigonometry implementations and tests remain preserved alongside the newer kerning implementation. No title unblock or performance improvement is claimed.
Tested
Rebased on upstream
maindc9f1ef656367272f8485b8ed1e11378adf45a2e; tested PR heade3a69bc1c6feff671965c2fb9610b27753ff5d3d. Windows 11 Pro 10.0.26300, Ryzen 9 7900X, 31.7 GiB RAM, NVIDIA GeForce RTX 4070 Ti SUPER, WinLibs MinGW-w64 GCC 15.2.0 UCRT, Ninja, Release,BUILD_TESTING=ON, pinned bundled dependencies. The FreeType/font tests use the CPU.cmake --build <build> --target relinker libs patched_libraries_tests 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 8: production relinker, patched libraries and all selected fixtures built on the rebased source.ctest --test-dir <build> -R '^(guest_freetype.*|guest_.*font.*|font_.*|patched_libraries)$' -V --output-on-failure --no-tests=error: 18/18 passed, zero skips; 368 patched libraries loaded, zero failures. CID regression: 115 query scenarios across four fonts, four rendered glyphs. Main's merged trigonometry regression also ran (4,226 scalar cases, 1,764 angle differences and 68 LP64 tangent goldens).Export.cppis byte-identical to the previous submitted head.git range-diffretained both commits; the sole conflict resolution preserved upstreamFT_TRIGONOMETRY_Hbeside this PR'sFT_CID_Hin the test includes. The existing orientation, Gasp, bitmap and trigonometry fixtures remained registered and executed.python tools/check_conventions.py --base origin/main,python tools/check_main_sync.py --base origin/main --strict,git diff origin/main...HEAD --checkandpython tools/check_test_registration.py <build>: passed.python tools/pr_overlap.py --branch codex/pr9545-rebase-20261024 --repo boykopovar/AnyPS5 --jobs 12completed; #9550 adds separate size exports at a shared header insertion, and the old #9545 branch is the expected self-match.No title/homebrew run or complete CTest suite is claimed on this rebased head. Console ABI/version and metadata equivalence remain unverified as recorded in debt.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:17:00Z.
Review: APPROVED
Reviewed the full adapter and regression diff against the pinned bundled FreeType 2.13.3 CID API. The wrappers preserve the native functions’ null-face, output initialization, optional/aliased output and per-font metadata behavior through the existing guest-face ownership map; the tests construct CID and non-CID fonts and compare each result/error against native FreeType, including output guards and rendering checks. The PR is based on current main, declares its shared-insertion order after #9538, and the branch overlap scan found no additional code overlap. Hosted eligibility, conventions, intake, labels and report checks pass; build jobs were skipped by path policy. The Windows builds/tests and syntax/registration checks in the PR description are author-reported; I did not run a local build.
Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-22T01:56:22Z.
I opened #9550 to add FT_New_Size, FT_Activate_Size and FT_Done_Size. I declared #9545 for merge order because both patches add FreeType API header includes at the same Export.cpp insertion. Retain both FT_CID_H and FT_SIZES_H; the implementations are independent.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:58:35Z.
Review: APPROVED
Rechecked the unchanged head and the declared #9538 merge-order dependency. The three CID adapters match the pinned FreeType behavior, and the generated CFF/native-comparison coverage addresses CID, named-CFF and TrueType paths, including optional and aliased outputs. Eligibility, conventions, intake, labels and report checks pass; product/relinker jobs were skipped. I did not run local tests. Approval remains conditional on merging #9538 first as declared.
Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-22T08:41:10Z.
Reviewed; verified against the pinned freetype source. The three CID wrappers delegate to the host FreeType through the existing face bridge (
FaceOf+ null host through), so every answer — including the null-face path, where the host initializes the outputs and then answersInvalid_Argument— is the pinned 2.13.3 build's own behavior fromftcid.c/cffdrivr.crather than anything written down here; the test's three input classes (name-keyed CFF, keyed-CFF, naked-CFF/TrueType) map onto exactly those driver implementations. Thestatic_assertpinningFT_Boolat 1 byte,FT_Int/FT_UIntat 4 matches the guest ABI those exports promise, so no re-wrapping of the FT_Bool return is needed. The debt entry honestly scopes what's unverified and links the pinnedftcid.cblob, and the native-face lifetime of the returned registry/ordering strings is called out. Existingguest_freetypetest stays under its budget; no registration change needed.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:32:14Z.
The detailed CID/native comparison and independent source review support the implementation; the declared #9538-before-#9545 insertion order remains correct while #9538 is open. I refreshed checks against upstream/main
4777caca34: diff-check and conventions pass, and the merge is clean, but this head is 2 ahead/119 behind (merge basea6dcea927). No intervening main commits changed the CID adapter, its tests or debt file. Please update to current main and rerun the focused FreeType tests/convention/overlap checks on the resulting head. The Windows tests remain author-reported; product/relinker jobs are skipped. I did not run local C++ tests because the root filesystem is full.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:32:16Z.
Review: DISMISSED
The CID wrappers and generated-font tests remain sound on review, and the declared dependency on #9538 accurately records the insertion order. I am requesting only the repository freshness follow-up: this head is 2 ahead/119 behind current upstream/main
4777caca34(merge basea6dcea927). Please update and rerun the focused FreeType tests and checks before merge, preserving the #9538 dependency and the follow-up chain. Diff-check, conventions and merge-tree pass on the current head; product/relinker jobs are skipped. I did not run local C++ tests due to the full filesystem.