summaryrefslogtreecommitdiff
path: root/src/bitmap/bitscale.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitmap/bitscale.c')
-rw-r--r--src/bitmap/bitscale.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
index 3e49ecf..8f7247e 100644
--- a/src/bitmap/bitscale.c
+++ b/src/bitmap/bitscale.c
@@ -36,6 +36,22 @@ from The Open Group.
#include <config.h>
#endif
+/*
+ * Translate monolithic #defines to modular definitions
+ */
+
+#ifdef PCFFORMAT
+#define XFONT_PCFFORMAT 1
+#endif
+
+#ifdef SNFFORMAT
+#define XFONT_SNFFORMAT 1
+#endif
+
+#ifdef BDFFORMAT
+#define XFONT_BDFFORMAT 1
+#endif
+
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include <X11/fonts/fontutil.h>
@@ -89,28 +105,28 @@ typedef FontPtr (*ScaleFunc) ( FontPtr /* pf */,
/* These next two arrays must be kept in step with the renderer array */
ScaleFunc scale[] =
{
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
BitmapScaleBitmaps,
BitmapScaleBitmaps,
#ifdef X_GZIP_FONT_COMPRESSION
BitmapScaleBitmaps,
#endif
#endif
-#ifdef SNFFORMAT
+#if XFONT_SNFFORMAT
BitmapScaleBitmaps,
BitmapScaleBitmaps,
#ifdef X_GZIP_FONT_COMPRESSION
BitmapScaleBitmaps,
#endif
#endif
-#ifdef BDFFORMAT
+#if XFONT_BDFFORMAT
BitmapScaleBitmaps,
BitmapScaleBitmaps,
#ifdef X_GZIP_FONT_COMPRESSION
BitmapScaleBitmaps,
#endif
#endif
-#ifdef PCFFORMAT
+#if XFONT_PCFFORMAT
PrinterScaleBitmaps,
#endif
};
@@ -139,22 +155,30 @@ typedef FontEntryPtr (*FindToScale) (FontPathElementPtr fpe,
FontPathElementPtr *fpep);
FindToScale find_scale[] =
{
+#if XFONT_PCFFORMAT
FindBestToScale,
FindBestToScale,
#ifdef X_GZIP_FONT_COMPRESSION
FindBestToScale,
#endif
+#endif
+#if XFONT_SNFFORMAT
FindBestToScale,
FindBestToScale,
#ifdef X_GZIP_FONT_COMPRESSION
FindBestToScale,
#endif
+#endif
+#if XFONT_BDFFORMAT
FindBestToScale,
FindBestToScale,
#ifdef X_GZIP_FONT_COMPRESSION
FindBestToScale,
#endif
+#endif
+#if XFONT_PCFFORMAT
FindPmfToScale,
+#endif
};
static unsigned long bitscaleGeneration = 0; /* initialization flag */