summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/font.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-01-12 17:30:59 +0000
committerRobin Watts <robin.watts@artifex.com>2016-01-13 12:32:58 +0000
commitad8936bf2bcf54c7042bdec20c49c96657649b34 (patch)
tree0d6e309f5747e493632b72b34acef1e53e1ed9d7 /include/mupdf/fitz/font.h
parent881b7ea89588677e709aaa7d3d0ffe4aed63822a (diff)
downloadmupdf-ad8936bf2bcf54c7042bdec20c49c96657649b34.tar.xz
Add lots of consts.
In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems.
Diffstat (limited to 'include/mupdf/fitz/font.h')
-rw-r--r--include/mupdf/fitz/font.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
index b6ea3362..eb3e1887 100644
--- a/include/mupdf/fitz/font.h
+++ b/include/mupdf/fitz/font.h
@@ -90,20 +90,20 @@ fz_font *fz_new_font_from_memory(fz_context *ctx, const char *name, unsigned cha
fz_font *fz_new_font_from_buffer(fz_context *ctx, const char *name, fz_buffer *buffer, int index, int use_glyph_bbox);
fz_font *fz_new_font_from_file(fz_context *ctx, const char *name, const char *path, int index, int use_glyph_bbox);
-fz_font *fz_keep_font(fz_context *ctx, fz_font *font);
-void fz_drop_font(fz_context *ctx, fz_font *font);
+fz_font *fz_keep_font(fz_context *ctx, const fz_font *font);
+void fz_drop_font(fz_context *ctx, const fz_font *font);
void fz_set_font_bbox(fz_context *ctx, fz_font *font, float xmin, float ymin, float xmax, float ymax);
-fz_rect *fz_bound_glyph(fz_context *ctx, fz_font *font, int gid, const fz_matrix *trm, fz_rect *r);
-int fz_glyph_cacheable(fz_context *ctx, fz_font *font, int gid);
+fz_rect *fz_bound_glyph(fz_context *ctx, const fz_font *font, int gid, const fz_matrix *trm, fz_rect *r);
+int fz_glyph_cacheable(fz_context *ctx, const fz_font *font, int gid);
-void fz_run_t3_glyph(fz_context *ctx, fz_font *font, int gid, const fz_matrix *trm, struct fz_device_s *dev);
+void fz_run_t3_glyph(fz_context *ctx, const fz_font *font, int gid, const fz_matrix *trm, struct fz_device_s *dev);
void fz_decouple_type3_font(fz_context *ctx, fz_font *font, void *t3doc);
-float fz_advance_glyph(fz_context *ctx, fz_font *font, int glyph);
-int fz_encode_character(fz_context *ctx, fz_font *font, int unicode);
+float fz_advance_glyph(fz_context *ctx, const fz_font *font, int glyph);
+int fz_encode_character(fz_context *ctx, const fz_font *font, int unicode);
-void fz_print_font(fz_context *ctx, fz_output *out, fz_font *font);
+void fz_print_font(fz_context *ctx, fz_output *out, const fz_font *font);
#endif