commit ff61c3430b376e374d5b5d7312c0ae8695eb94ed
parent 5477623c102b2f555fe26de2cc4d6df7288e2355
Author: Andrew Herbert <andy.herbert@gmail.com>
Date: Thu, 22 Aug 2019 21:02:09 +0100
Infer font height to 16, the default in absence of font data.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/loaders/xbin.c b/src/loaders/xbin.c
@@ -50,6 +50,10 @@ ansilove_xbin(struct ansilove_ctx *ctx, struct ansilove_options *options)
uint32_t xbin_fontsize = ctx->buffer[9];
uint32_t xbin_flags = ctx->buffer[10];
+ if (xbin_fontsize == 0) {
+ xbin_fontsize = 16;
+ }
+
gdImagePtr canvas;
canvas = gdImageCreate(8 * xbin_width, xbin_fontsize * xbin_height);