From cc83451bdfde6930c26e741ac55d2f9cd986a9c8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 12 Mar 2018 13:21:54 +0100 Subject: Ensure we pass AA options to draw device and set text_bits appropriately. aa.text_bits should be 0 when using the 'any' or 'center' rasterizers. --- source/fitz/draw-device.c | 2 +- source/fitz/draw-rasterize.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 12ea4aa1..2ae7354b 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -3283,7 +3283,7 @@ fz_new_draw_device_with_options(fz_context *ctx, const fz_draw_options *opts, co else fz_clear_pixmap_with_value(ctx, *pixmap, 255); - dev = fz_new_draw_device(ctx, &transform, *pixmap); + dev = new_draw_device(ctx, &transform, *pixmap, &aa, NULL, NULL); } fz_catch(ctx) { diff --git a/source/fitz/draw-rasterize.c b/source/fitz/draw-rasterize.c index 8b55b668..8a094c80 100644 --- a/source/fitz/draw-rasterize.c +++ b/source/fitz/draw-rasterize.c @@ -75,7 +75,9 @@ fz_set_rasterizer_text_aa_level(fz_context *ctx, fz_aa_context *aa, int level) fz_warn(ctx, "Only the %d bit anti-aliasing rasterizer was compiled in", fz_aa_bits); } #else - if (level > 6) + if (level > 8) + aa->text_bits = 0; + else if (level > 6) aa->text_bits = 8; else if (level > 4) aa->text_bits = 6; -- cgit v1.2.3