feat(libSceFreeTypeOt): implement FT_Render_Glyph_Internal #17779
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17779"
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 zkiller1236 on 2026-11-09T15:39:55Z.
What
libSceFreeTypeOt exported NID
8A0cAU4yBVYas an unnamed throwing placeholder. The pinned NID database (tools/nid_names.py) names itFT_Render_Glyph_Internal, FreeType's internalftobjs.hfunctionFT_Error FT_Render_Glyph_Internal(FT_Library, FT_GlyphSlot, FT_Render_Mode). It is now implemented inExport.cppand declared ininclude/GlyphSlot.hpp, the module's copy of theftobjs.hdeclarations.In FreeType, the public
FT_Render_Glyph(slot, mode)checks the slot and its face and then callsFT_Render_Glyph_Internal(FT_FACE_LIBRARY(slot->face), slot, mode)(ftobjs.c). So when the library passed in is the slot's own library, the two are the same call, and the new export returns the libSceFreeTypeFT_Render_Glyphwrapper's result. Everything else throws: a null library or slot, a slot without a face, a slot whose library is a different one, and a slot that is not the glyph slot of one of the library's faces. Rendering with another library's renderers is not modelled, and libSceFreeTypeOt's own glyph-slot helpers giveslot->internala different meaning from libSceFreeType's, so only slots that libSceFreeType created are accepted. A debt entry records this and that the prototype is unverified for the provider. The progress report counts the export as a stub because these unsupported inputs deliberately callNotImplemented_nid_no_patch; the supported case renders, as the test below shows.Tested
Linux x86-64, GCC, Release with
BUILD_TESTING=ON, onmainffe575754a.guest_freetype_ot_render_internalpasses. It opens theSquareGlyphFontfixture, loads glyph 1 at 24 px, renders it throughFT_Render_Glyph_InternalinFT_RENDER_MODE_NORMALandFT_RENDER_MODE_MONO, and compares the result code, format, bitmap size, pitch, origin and every bitmap byte with host FreeType'sFT_Render_Glyph. It renders the already-rendered slot again, and checks that a different library, a null library, a null slot and an unregistered copy of the slot each throw.libSceFreeTypeOt.prxexports8A0cAU4yBVYat the new function's address (nm -D). Onmainthe export is a placeholder that throws.guest_freetype*tests that were built pass.check_conventions.py --base origin/mainpasses.pr_overlap.pyreports no shared exports; #15052 and #16122 also append test registrations at the end oflibSceFreeTypeOt/CMakeLists.txt, and ten PRs that conflict withmaincould not be compared; none of their diffs mention this NID or name. It merges cleanly with #17772 and #17776.FT_Render_Glyph_Internal(including its colour-layer and bitmap-slot paths, which the wrapper reaches through hostFT_Render_Glyph) and found nothing blocking.Windows was not built here; PS5/title execution is untested.
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)Claude Code assisted with the investigation, implementation, tests and review.
🤖 Generated with Claude Code
https://claude.ai/code/session_0145C1bggApen1Stz87XDkXo