diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-03-12 13:21:54 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-03-12 15:49:25 +0100 |
commit | cc83451bdfde6930c26e741ac55d2f9cd986a9c8 (patch) | |
tree | c788abceed625e33c77e52cf581d1a5a78cd730e /source | |
parent | a7aac9428675cd576ac2e55fe0a61fa6091ba27a (diff) | |
download | mupdf-cc83451bdfde6930c26e741ac55d2f9cd986a9c8.tar.xz |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/draw-device.c | 2 | ||||
-rw-r--r-- | source/fitz/draw-rasterize.c | 4 |
2 files changed, 4 insertions, 2 deletions
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; |