summaryrefslogtreecommitdiff
path: root/xc/lib/Xft/xftcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib/Xft/xftcore.c')
-rw-r--r--xc/lib/Xft/xftcore.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/xc/lib/Xft/xftcore.c b/xc/lib/Xft/xftcore.c
index 8360831af..692e17ad6 100644
--- a/xc/lib/Xft/xftcore.c
+++ b/xc/lib/Xft/xftcore.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/Xft/xftcore.c,v 1.1 2000/11/29 08:39:21 keithp Exp $
+ * $XFree86: xc/lib/Xft/xftcore.c,v 1.3 2000/12/02 10:02:04 keithp Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -46,7 +46,7 @@ XftCoreConvert16 (unsigned short *string,
}
XChar2b *
-XftCoreConvert32 (unsigned long *string,
+XftCoreConvert32 (unsigned int *string,
int len,
XChar2b xcloc[XFT_CORE_N16LOCAL])
{
@@ -128,7 +128,7 @@ XftCoreExtents16 (Display *dpy,
void
XftCoreExtents32 (Display *dpy,
XFontStruct *fs,
- unsigned long *string,
+ unsigned int *string,
int len,
XGlyphInfo *extents)
{
@@ -156,3 +156,23 @@ XftCoreExtents32 (Display *dpy,
extents->yOff = 0;
}
+Bool
+XftCoreGlyphExists (Display *dpy,
+ XFontStruct *fs,
+ unsigned int glyph)
+{
+ int direction;
+ int ascent, descent;
+ XCharStruct overall;
+ XChar2b xc;
+
+ XftCoreConvert32 (&glyph, 1, &xc);
+ XTextExtents16 (fs, &xc, 1, &direction,
+ &ascent, &descent, &overall);
+ return (overall.lbearing != 0 ||
+ overall.rbearing != 0 ||
+ overall.width != 0 ||
+ overall.ascent != 0 ||
+ overall.descent != 0);
+}
+