feat(libSceFreeType): implement FT_Get_Sfnt_Table and FT_Outline_Get_Bitmap #10601
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10601"
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 MarcZX10 on 2026-10-24T12:04:28Z.
What
Adds
FT_Get_Sfnt_TableandFT_Outline_Get_Bitmapto libSceFreeType, following the bundled FreeType 2.13.3 (ftobjs.c, ftoutln.c).FT_Get_Sfnt_Tablereturns the native table pointer unchanged, so the guest reads the nativeTT_*structures. Their public layouts match the console's LP64 ones only with a 64-bitFT_Long, so a host with a 32-bitFT_Long(Windows) throws for a registered face instead of returning a mismatched layout.FT_Outline_Get_Bitmapruns the native rasteriser on a native copy of the guest outline and renders into the guest bitmap buffer in place; it follows the native argument checks and error codes, and a guest coordinate outside the hostFT_Posrange throws (Windows only).Console signatures and errors are unverified; the debt entries say so.
Commits: for each function in turn, the implementation, its test and its debt entry.
Tested
Linux x86-64, GCC, full CMake build (Ninja, Release).
guest_freetype_sfnt_tablecompares the returned tables of a TrueType fixture (head,hhea,maxp,OS/2,post), absent tables (vhea,PCLT), out-of-range tags and a BDF face with a native oracle, byte for byte, and covers null and unregistered faces.guest_freetype_outline_bitmaprenders a square, a triangle and a curved contour into gray and mono bitmaps through both paths and compares the pixels, and compares the error codes for an unsupported pixel mode, a null bitmap, a null outline and a null library. The host CPU (Xeon E5-1620 v2) fails the startup CPU-feature gate, so I ran both tests with that check disabled in a local, uncommitted edit; both exit 0. Windows was not run.tools/check_conventions.pyandgit diff --checkpass. No title or GPU involved.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)