feat(libfontconfig): implement FcPatternGetFTFace #17744
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17744"
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-09T13:54:50Z.
What
FcPatternGetFTFace(NIDHjlABSyLzNg) was a parameterless placeholder that threw. It now takes the publicfontconfig.hprototype, with theFT_Faceoutput as an opaque pointer (void**, the same LP64 ABI), and sits inObjects.cppnext to the other typed getters. It follows Fontconfig 2.15.0'sfcpat.cstep for step, likeFcPatternGetInteger,GetBool,GetStringandGetMatrixhere: it returnsFcPatternGet's result when that is not a match, returnsFcResultTypeMismatchwhen the value is notFcTypeFTFace, and otherwise stores the face. As in the sibling getters, a null output on the matching path throws.No export in this module stores a FreeType face in a pattern (pattern values are integers, booleans, doubles, strings and matrices), so in practice it returns
FcResultNoMatch,FcResultNoIdorFcResultTypeMismatchwithout touching the output; the matching path is written per the source but cannot be exercised yet. The row leaves the debt file's placeholder table (16 to 15) and gets an entry stating this, and that the console prototype and behaviour are unverified.Tested
Linux x86-64, GCC, Release with
BUILD_TESTING=ON, onmaind792f1ad5f.guest_fontconfig_objectsand the other fourguest_fontconfig*tests pass. The newFreeTypeFaceGettercovers a null pattern, a missing object, string and integer values (FcResultTypeMismatch, including with a null output), and ids 1 and -1 (FcResultNoId), checking that the output keeps its sentinel value each time.mainthe test does not compile, because the export takes no parameters there, and calling it throws.check_conventions.py --base origin/mainpasses.pr_overlap.pyreports no shared exports. #16564 removes neighbouring placeholder stubs and debt-table rows, and #16634, #17631 and my #17741 change the debt table's count line, so whichever merges later resolves small text conflicts; the new function and test were placed away from #16564's additions to keep those conflicts small.FcTypeFTFacevalue; its one optional wording change to the debt entry is applied.Windows and PS5/title execution are 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 implementation, tests and review.
🤖 Generated with Claude Code
https://claude.ai/code/session_0145C1bggApen1Stz87XDkXo