summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/util.c b/util.c
index ba9d096..655b5cf 100644
--- a/util.c
+++ b/util.c
@@ -405,6 +405,24 @@ faceIntProp(FT_Face face, const char *name)
}
char *
+faceStringProp(FT_Face face, const char *name)
+{
+ int rc;
+ BDF_PropertyRec prop;
+ char *buf = NULL;
+
+ rc = FT_Get_BDF_Property(face, name, &prop);
+ if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_ATOM) {
+ buf = sprintf_alloc("%s", prop.u.atom ? prop.u.atom : "");
+ if(buf == NULL) {
+ perror("sprintf_alloc failed");
+ exit(1);
+ }
+ }
+ return buf;
+}
+
+char *
faceEncoding(FT_Face face)
{
BDF_PropertyRec p1, p2;