Skip to content

feat(libSceFreeType): load glyphs by character code - #8289

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
santhoshkumar-dev:codex/freetype-load-character
Oct 21, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
santhoshkumar-dev:codex/freetype-load-character

Conversation

@santhoshkumar-dev

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

Copy link
Copy Markdown
Contributor

What

Add FT_Load_Char to the existing libSceFreeType guest bridge. It delegates character lookup, the direct glyph-index fallback for faces without a charmap, and load/render flags to bundled FreeType, then refreshes the guest glyph slot on success or error. Its LP64 character argument uses the same low-32-bit conversion as the existing FT_Get_Char_Index adapter.

The name/NID wPQ0rMK4-JU is present in the PS5 3.20 inventory. Behavior follows bundled FreeType 2.13.3 FT_Load_Char. Console-version and ABI uncertainty remains as recorded in the existing library debt.

Tested

Windows 11 x64, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, BUILD_TESTING=ON, based on upstream 35fa2bdd82.

  • Full project build passed; registered guest_freetype passed (0.07 s).
  • The existing regression compares all mirrored slot fields, outline points, metrics and bitmap bytes with native FreeType. New cases cover mapped and missing characters, high character-code bits, unscaled/unhinted/render loads, a null face, and a font whose cmap directory entry is renamed to make it absent. Without a charmap, glyph 1 loads directly and out-of-range glyph 2 returns the native error and slot state.
  • A compiled source mutation that always performs a charmap lookup fails the new no-charmap case.
  • Strict -Wall -Wextra -Werror syntax checks and conventions passed.
  • Temporarily merged feat(libSceFreeType): support memory fonts and face cleanup #8247, feat(libSceFreeType): select and iterate character maps #8253 and feat(libSceFreeType): copy and convert guest bitmaps #8286 without committing; all FreeType targets built and guest_freetype_bitmap, guest_freetype and guest_freetype_charmap passed (0.06 s / 0.08 s / 0.07 s). Aborted the merge afterward.
  • Restored and rebuilt the independent branch: guest_freetype passed again (0.09 s), and the patched PRX exports wPQ0rMK4-JU.
  • Final open-PR overlap check: No overlap with open pull requests. Open, closed and merged FreeType history was reviewed before implementation.

Latest main e9a5a0c849 was checked before publication; it changes no FreeType or libc dependency source.

No title, PS5 hardware or Linux runtime was tested.

Refresh on 2026-10-21: rebased onto upstream 1381826358, rebuilt the FreeType library and both current test targets, and reran guest_freetype and guest_freetype_charmap (0.08 s / 0.07 s). Conventions passed. Production behavior is unchanged.

Compatibility validation (2026-10-21): temporarily combined this PR with #8247, #8286, #9045, #9054, #9064 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.

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 20, 2026 •

Copy link
Copy Markdown

Progress report (b6fe513 → f43de1f)

📈 System libraries: 50.59% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceFreeType FT_Load_Char_nid_postfix

@github-actions github-actions Bot added the prx label Oct 20, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the FT_Load_Char adapter against FreeType 2.13.3 (low-32-bit charcode, slot sync on error, null face), and that guest_freetype compares slot, outline and bitmap with native FreeType, including the no-cmap case and high character-code bits; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants