summaryrefslogtreecommitdiff
path: root/fitz/res_font.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-02-03 16:04:03 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-02-03 16:04:03 +0100
commitf262a8c0bfae0cd90c2cd29acd409baf2157c241 (patch)
tree1a9f3a8c483e16c5d3d435d7c7143a6aa73b58e1 /fitz/res_font.c
parent139d80bd65a164accf9d36d244d3d6a4c555aa47 (diff)
downloadmupdf-f262a8c0bfae0cd90c2cd29acd409baf2157c241.tar.xz
Be consistent about passing a fz_context in path/text/shade functions.
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r--fitz/res_font.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c
index 47dc96d5..f8dcfb90 100644
--- a/fitz/res_font.c
+++ b/fitz/res_font.c
@@ -68,9 +68,10 @@ fz_new_font(fz_context *ctx, char *name, int use_glyph_bbox, int glyph_count)
}
fz_font *
-fz_keep_font(fz_font *font)
+fz_keep_font(fz_context *ctx, fz_font *font)
{
- font->refs ++;
+ if (font)
+ font->refs ++;
return font;
}
@@ -111,7 +112,7 @@ fz_drop_font(fz_context *ctx, fz_font *font)
}
void
-fz_set_font_bbox(fz_font *font, float xmin, float ymin, float xmax, float ymax)
+fz_set_font_bbox(fz_context *ctx, fz_font *font, float xmin, float ymin, float xmax, float ymax)
{
font->bbox.x0 = xmin;
font->bbox.y0 = ymin;
@@ -749,7 +750,7 @@ fz_render_t3_glyph_direct(fz_context *ctx, fz_device *dev, fz_font *font, int gi
}
void
-fz_debug_font(fz_font *font)
+fz_debug_font(fz_context *ctx, fz_font *font)
{
printf("font '%s' {\n", font->name);
@@ -795,7 +796,7 @@ fz_bound_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm)
return fz_transform_rect(trm, font->bbox);
}
-int fz_glyph_cacheable(fz_font *font, int gid)
+int fz_glyph_cacheable(fz_context *ctx, fz_font *font, int gid)
{
if (!font->t3procs || !font->t3flags || gid < 0 || gid >= font->bbox_count)
return 1;