changeset 24145:95d0947c83b2

(FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_MAX_WIDTH): Support BDF fonts.
author Geoff Voelker <voelker@cs.washington.edu>
date Fri, 22 Jan 1999 19:58:23 +0000
parents 236627b268cc
children 9ed2245a9b79
files src/w32term.h
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.h	Fri Jan 22 19:58:10 1999 +0000
+++ b/src/w32term.h	Fri Jan 22 19:58:23 1999 +0000
@@ -28,10 +28,15 @@
 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0)
 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)
 
-#define FONT_WIDTH(f)	((f)->tm.tmAveCharWidth)
-#define FONT_HEIGHT(f)	((f)->tm.tmHeight)
-#define FONT_BASE(f)    ((f)->tm.tmAscent)
-#define FONT_MAX_WIDTH(f) ((f)->tm.tmMaxCharWidth)
+#define FONT_WIDTH(f)       \
+  ((f)->bdf ? (f)->bdf->width : (f)->tm.tmAveCharWidth)
+#define FONT_HEIGHT(f)      \
+   ((f)->bdf ? (f)->bdf->height : (f)->tm.tmHeight)
+/* No idea why 5 seems to work in here, but it does */
+#define FONT_BASE(f)        \
+  ((f)->bdf ? (f)->bdf->ury : (f)->tm.tmAscent)
+#define FONT_MAX_WIDTH(f)   \
+  ((f)->bdf ? (f)->bdf->width : (f)->tm.tmMaxCharWidth)
 
 #define CHECK_W32_FRAME(f, frame)		\
   if (NILP (frame))				\