summaryrefslogtreecommitdiff
path: root/fitz/res_font.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-12-06 15:03:35 +0000
committerRobin Watts <robin.watts@artifex.com>2011-12-06 15:03:35 +0000
commit51ea850c2f8464a7245268af3d496141b513d6ba (patch)
treeb39e88b4f06690bbd14e571934c7b88df4336bc4 /fitz/res_font.c
parent3a207e707b352b8031409f3851705fbc7eccff36 (diff)
downloadmupdf-51ea850c2f8464a7245268af3d496141b513d6ba.tar.xz
Move antialias levels into context.
In builds that support configurable layers of antialiasing, move the variables that control this into the context. This makes it possible to safely use different levels of antialiasing in different threads.
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r--fitz/res_font.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c
index fa011d24..4b30d424 100644
--- a/fitz/res_font.c
+++ b/fitz/res_font.c
@@ -361,7 +361,7 @@ fz_render_ft_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm)
fz_warn(ctx, "freetype setting character size: %s", ft_error_string(fterr));
FT_Set_Transform(face, &m, &v);
- if (fz_get_aa_level() == 0)
+ if (fz_get_aa_level(ctx) == 0)
{
/* If you really want grid fitting, enable this code. */
float scale = fz_matrix_expansion(trm);
@@ -410,7 +410,7 @@ fz_render_ft_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm)
FT_Outline_Translate(&face->glyph->outline, -strength * 32, -strength * 32);
}
- fterr = FT_Render_Glyph(face->glyph, fz_get_aa_level() > 0 ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
+ fterr = FT_Render_Glyph(face->glyph, fz_get_aa_level(ctx) > 0 ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
if (fterr)
{
fz_warn(ctx, "freetype render glyph (gid %d): %s", gid, ft_error_string(fterr));
@@ -490,7 +490,7 @@ fz_render_ft_stroked_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix tr
FT_Stroker_Done(stroker);
- fterr = FT_Glyph_To_Bitmap(&glyph, fz_get_aa_level() > 0 ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, 0, 1);
+ fterr = FT_Glyph_To_Bitmap(&glyph, fz_get_aa_level(ctx) > 0 ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, 0, 1);
if (fterr)
{
fz_warn(ctx, "FT_Glyph_To_Bitmap: %s", ft_error_string(fterr));