diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2005-06-24 22:43:20 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2005-06-24 22:43:20 +0000 |
commit | 403c9f9886cea9fd390a242e7c031ba2cc26217f (patch) | |
tree | 658f8b187b522ed4ad0514ae30cbe495d45ba503 /src/xftextent.c | |
parent | 1d14cc37d43bf349ee18e748f62913a0963f6e85 (diff) | |
download | xorg-lib-libXft-403c9f9886cea9fd390a242e7c031ba2cc26217f.tar.gz |
Sync with Xft from xlibs CVS (2.1.7 plus man page updates from BrandenXORG-6_8_99_13
Robinson) - see lib/Xft/ChangeLog for full details
Diffstat (limited to 'src/xftextent.c')
-rw-r--r-- | src/xftextent.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/xftextent.c b/src/xftextent.c index 25e096e..49db898 100644 --- a/src/xftextent.c +++ b/src/xftextent.c @@ -1,7 +1,7 @@ /* - * $XFree86: xc/lib/Xft/xftextent.c,v 1.9 2002/10/11 17:53:02 keithp Exp $ + * $Id$ * - * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2000 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -22,8 +22,6 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#include <stdlib.h> -#include <string.h> #include "xftint.h" void @@ -66,14 +64,12 @@ XftGlyphExtents (Display *dpy, (xftg = font->glyphs[glyph])) break; } - if (n == 0 && !xftg) + if (n == 0) { - extents->width = 0; - extents->height = 0; - extents->x = 0; - extents->y = 0; - extents->yOff = 0; - extents->xOff = 0; + if (xftg) + *extents = xftg->metrics; + else + memset (extents, '\0', sizeof (*extents)); } else { |