From 931b777108526dd0761f948dcd9f1603ac02efc8 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 17 Jan 2007 17:19:53 -0500 Subject: Add stubs for the scalable renderer callbacks. Trying to scale a bitmap font provided by the built-in backend will crash the X server as it calls into a NULL pointer. This patch adds "return BadFont;" stubs to prevent the crash. --- src/builtins/render.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/builtins') diff --git a/src/builtins/render.c b/src/builtins/render.c index 39a8f07..18389b4 100644 --- a/src/builtins/render.c +++ b/src/builtins/render.c @@ -97,9 +97,38 @@ BuiltinGetInfoBitmap (fpe, pFontInfo, entry, fileName) return ret; } +static int +BuiltinOpenScalable (FontPathElementPtr fpe, + FontPtr *pFont, + int flags, + FontEntryPtr entry, + char *fileName, + FontScalablePtr vals, + fsBitmapFormat format, + fsBitmapFormatMask fmask, + FontPtr non_cachable_font) /* We don't do licensing */ +{ + return BadFontName; +} + +static int +BuiltinGetInfoScalable (FontPathElementPtr fpe, + FontInfoPtr pFontInfo, + FontEntryPtr entry, + FontNamePtr fontName, + char *fileName, + FontScalablePtr vals) +{ + return BadFontName; +} + static FontRendererRec renderers[] = { ".builtin", 8, - BuiltinOpenBitmap, 0, BuiltinGetInfoBitmap, 0, 0 + BuiltinOpenBitmap, + BuiltinOpenScalable, + BuiltinGetInfoBitmap, + BuiltinGetInfoScalable, + 0 }; #define numRenderers (sizeof renderers / sizeof renderers[0]) -- cgit v1.2.3