feat(libSceFreeType): configure scalar and darkening properties #10178

Merged
santhoshkumar-dev merged 6 commits from upstream-pr/10178 into main 2026-10-27 08:07:32 +00:00
santhoshkumar-dev commented 2026-10-23 12:03:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-23T12:03:02Z.


What

Implement FT_Property_Get (8fAMdZCnewA) and FT_Property_Set (LsB538+IPrE) for 15 module/property pairs with fixed-width values: truetype interpreter-version; cff/type1/t1cid hinting-engine, random-seed, no-stem-darkening and darkening-parameters; autofitter no-stem-darkening and darkening-parameters. Values are copied through aligned native locals as 32-bit signed/unsigned words, one-byte booleans or eight 32-bit integers. Getters copy only successful results, preserving output on error. Settings belong to the actual native library, not process-global emulated state.

Other property pairs, including face-pointer records and SVG callbacks, throw before inspecting their value. Native errors are retained for supported pairs, including the write-only random-seed getter. Console signatures/property availability/backend equivalence are unverified and recorded in debt. Names/NIDs follow the PS5 inventory; types and behavior follow pinned ftdriver.h, ftobjs.c, ftpsprop.c and the native driver property services.

Each implemented export is declared once in the canonical public API, included by the implementation and tests. The branch preserves the latest upstream PFR APIs and all merged FreeType features.

The named OT-provider import-resolution helpers also have one declaration each in the shared public API already reachable from the OT umbrella. Export.cpp includes that header. Their existing zero-argument placeholder signatures, explicit NID aliases and throwing behavior are unchanged; this does not establish the console prototypes.

The OT debt paragraph still overlaps #10897. Proposed documentation order: these helper-declaration updates first, then the validation PR retaining the generic pending-helper paragraph and its identified validation names. This order awaits the other author's confirmation; no code or build dependency is required.

The adapter belongs to physical libSceFreeType. Same-NID inventory stubs in the distinct physical libSceFreeTypeOl and libSceFreeTypeOt providers remain throwing helpers.

Tested

Submitted and tested head 0fd587337a9a6f0aa52821283d8a2caa0ae0bbce, including upstream main 48c160c58b589157ebd94ebd53736a182f8303bf.

Windows 11 x64 / WinLibs GCC 15.2.0 r7 and local Ubuntu 24.04.1 x86-64 under WSL2 / GCC 13.3.0 / glibc 2.39: Ninja Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF. On each platform the complete libs target and selected test executables build, and 70/70 CTests pass, zero skips: the public-header audit, all 64 public-header compilation batches and 5 focused runtime tests. The new upstream JPEG XR and updated SPIR-V dependencies use their pinned submodule commits. Both normal-symbol and actual packaged-NID modes run alongside the base/charmap checks and packaged-library loader.

The initial Windows header audit hit its 30-second timeout; the unchanged head then passed the complete 70-test selection with the original timeouts.

Final upstream recheck: 88795ed44801fa719eb2df990cbe1f11a1f9bd81 merges cleanly; no FreeType/LibreSSL production, shared-header, test-registration or debt changes appeared after the tested base. Results remain pinned to the exact submitted head and its stated base.

Conventions, whitespace and all 15 pairwise merge checks across the six maintained PRs pass. Open/closed/merged history was rechecked; no replacement implementation was found. No title or physical-console execution is claimed.

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:4982422917 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10178). Originally posted by [santhoshkumar-dev](https://github.com/santhoshkumar-dev) on 2026-10-23T12:03:02Z. --- ### What Implement `FT_Property_Get` (`8fAMdZCnewA`) and `FT_Property_Set` (`LsB538+IPrE`) for 15 module/property pairs with fixed-width values: truetype interpreter-version; cff/type1/t1cid hinting-engine, random-seed, no-stem-darkening and darkening-parameters; autofitter no-stem-darkening and darkening-parameters. Values are copied through aligned native locals as 32-bit signed/unsigned words, one-byte booleans or eight 32-bit integers. Getters copy only successful results, preserving output on error. Settings belong to the actual native library, not process-global emulated state. Other property pairs, including face-pointer records and SVG callbacks, throw before inspecting their value. Native errors are retained for supported pairs, including the write-only random-seed getter. Console signatures/property availability/backend equivalence are unverified and recorded in debt. Names/NIDs follow the [PS5 inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceFreeTypeOt.c); types and behavior follow pinned [ftdriver.h](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/include/freetype/ftdriver.h), [ftobjs.c](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftobjs.c), [ftpsprop.c](https://github.com/freetype/freetype/blob/42608f77f20749dd6ddc9e0536788eaad70ea4b5/src/base/ftpsprop.c) and the native driver property services. Each implemented export is declared once in the canonical public API, included by the implementation and tests. The branch preserves the latest upstream PFR APIs and all merged FreeType features. The named OT-provider import-resolution helpers also have one declaration each in the shared public API already reachable from the OT umbrella. Export.cpp includes that header. Their existing zero-argument placeholder signatures, explicit NID aliases and throwing behavior are unchanged; this does not establish the console prototypes. The OT debt paragraph still overlaps #10897. Proposed documentation order: these helper-declaration updates first, then the validation PR retaining the generic pending-helper paragraph and its identified validation names. This order awaits the other author's confirmation; no code or build dependency is required. The adapter belongs to physical `libSceFreeType`. Same-NID inventory stubs in the distinct physical `libSceFreeTypeOl` and `libSceFreeTypeOt` providers remain throwing helpers. ### Tested Submitted and tested head `0fd587337a9a6f0aa52821283d8a2caa0ae0bbce`, including upstream main `48c160c58b589157ebd94ebd53736a182f8303bf`. Windows 11 x64 / WinLibs GCC 15.2.0 r7 and local Ubuntu 24.04.1 x86-64 under WSL2 / GCC 13.3.0 / glibc 2.39: Ninja Release, bundled dependencies, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`. On each platform the complete `libs` target and selected test executables build, and **70/70 CTests pass, zero skips**: the public-header audit, all 64 public-header compilation batches and 5 focused runtime tests. The new upstream JPEG XR and updated SPIR-V dependencies use their pinned submodule commits. Both normal-symbol and actual packaged-NID modes run alongside the base/charmap checks and packaged-library loader. The initial Windows header audit hit its 30-second timeout; the unchanged head then passed the complete 70-test selection with the original timeouts. Final upstream recheck: `88795ed44801fa719eb2df990cbe1f11a1f9bd81` merges cleanly; no FreeType/LibreSSL production, shared-header, test-registration or debt changes appeared after the tested base. Results remain pinned to the exact submitted head and its stated base. Conventions, whitespace and all 15 pairwise merge checks across the six maintained PRs pass. Open/closed/merged history was rechecked; no replacement implementation was found. No title or physical-console execution is claimed. <!-- 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. --> ### 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: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-10-23 12:09:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T12:09:26Z.

Review: APPROVED


Reviewed the exact submitted head a3640ce984124500c427f785cae5d18f5e0d32e3. The adapters use fixed-width native locals before copying to guest buffers, preserve output on native errors, and keep property changes attached to the supplied FreeType library. The tests exercise supported properties against native FreeType across two libraries, unaligned buffers, exact copy widths, error preservation, and unsupported pointer/callback pairs. Eligibility, conventions, intake, labels and report checks pass; hosted product build jobs were skipped by repository path policy. The PR reports complete Windows and Linux library builds plus 5/5 focused tests on both. I did not independently reproduce those full builds locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5628005258 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10178#pullrequestreview-5628005258). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T12:09:26Z. **Review:** APPROVED --- Reviewed the exact submitted head `a3640ce984124500c427f785cae5d18f5e0d32e3`. The adapters use fixed-width native locals before copying to guest buffers, preserve output on native errors, and keep property changes attached to the supplied FreeType library. The tests exercise supported properties against native FreeType across two libraries, unaligned buffers, exact copy widths, error preservation, and unsupported pointer/callback pairs. Eligibility, conventions, intake, labels and report checks pass; hosted product build jobs were skipped by repository path policy. The PR reports complete Windows and Linux library builds plus 5/5 focused tests on both. I did not independently reproduce those full builds locally.
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!10178
No description provided.