fontconfig: Branch 'main' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 17 10:47:31 UTC 2025


 src/fcpat.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 1188be672a558928e5c0fca0fdb38fa130b2d41c
Merge: bf8067f 3faf06c
Author: Akira TAGOH <akira at tagoh.org>
Date:   Thu Apr 17 10:47:25 2025 +0000

    Merge branch 'patternObjImpls' into 'main'
    
    Add FcPatternObjectGet* impl for CharSet and LangSet
    
    See merge request fontconfig/fontconfig!384

commit 3faf06cf6c2749793f5407574d652cc656e4f1ab
Author: Dominik Röttsches <drott at chromium.org>
Date:   Tue Apr 15 11:06:19 2025 +0300

    Add FcPatternObjectGet* impl for CharSet and LangSet
    
    fcint.h declares these functions, but they did not seem to have an
    implementation yet.
    
    Preparation for pattern bindings for CharSet and LangSet in Rust.
    
    Changelog: added

diff --git a/src/fcpat.c b/src/fcpat.c
index c348888..936f257 100644
--- a/src/fcpat.c
+++ b/src/fcpat.c
@@ -1066,11 +1066,17 @@ FcPatternGetBool (const FcPattern *p, const char *object, int id, FcBool *b)
 
 FcResult
 FcPatternGetCharSet (const FcPattern *p, const char *object, int id, FcCharSet **c)
+{
+    return FcPatternObjectGetCharSet (p, FcObjectFromName (object), id, c);
+}
+
+FcResult
+FcPatternObjectGetCharSet (const FcPattern *p, FcObject object, int id, FcCharSet **c)
 {
     FcValue  v;
     FcResult r;
 
-    r = FcPatternGet (p, object, id, &v);
+    r = FcPatternObjectGet (p, object, id, &v);
     if (r != FcResultMatch)
 	return r;
     if (v.type != FcTypeCharSet)
@@ -1096,11 +1102,17 @@ FcPatternGetFTFace (const FcPattern *p, const char *object, int id, FT_Face *f)
 
 FcResult
 FcPatternGetLangSet (const FcPattern *p, const char *object, int id, FcLangSet **ls)
+{
+    return FcPatternObjectGetLangSet (p, FcObjectFromName (object), id, ls);
+}
+
+FcResult
+FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int id, FcLangSet **ls)
 {
     FcValue  v;
     FcResult r;
 
-    r = FcPatternGet (p, object, id, &v);
+    r = FcPatternObjectGet (p, object, id, &v);
     if (r != FcResultMatch)
 	return r;
     if (v.type != FcTypeLangSet)


More information about the Fontconfig mailing list