summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-11-26 11:30:50 +0100
committerTor Andersson <tor.andersson@artifex.com>2013-11-26 11:30:50 +0100
commite1d7a913f08446b77071ea71e4aef89588d68334 (patch)
tree987900df70d1bbb85d93e9330d4e36cd4281d19d
parentbea951c1e5f5e79c44b5a4a1ba1fd0a69d7a005d (diff)
downloadmupdf-e1d7a913f08446b77071ea71e4aef89588d68334.tar.xz
Add const keyword to some font function parameters.
-rw-r--r--include/mupdf/fitz/font.h8
-rw-r--r--include/mupdf/pdf/font.h2
-rw-r--r--source/fitz/font.c10
-rw-r--r--source/pdf/pdf-fontfile.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
index 5fc07b81..8cd6921e 100644
--- a/include/mupdf/fitz/font.h
+++ b/include/mupdf/fitz/font.h
@@ -69,11 +69,11 @@ typedef fz_buffer *(*fz_load_system_font_func)(fz_context *ctx, const char *name
void fz_install_load_system_font_func(fz_context *ctx, fz_load_system_font_func f);
fz_buffer *fz_load_system_font(fz_context *ctx, const char *name);
-fz_font *fz_new_type3_font(fz_context *ctx, char *name, const fz_matrix *matrix);
+fz_font *fz_new_type3_font(fz_context *ctx, const char *name, const fz_matrix *matrix);
-fz_font *fz_new_font_from_memory(fz_context *ctx, char *name, unsigned char *data, int len, int index, int use_glyph_bbox);
-fz_font *fz_new_font_from_buffer(fz_context *ctx, char *name, fz_buffer *buffer, int index, int use_glyph_bbox);
-fz_font *fz_new_font_from_file(fz_context *ctx, char *name, char *path, int index, int use_glyph_bbox);
+fz_font *fz_new_font_from_memory(fz_context *ctx, const char *name, unsigned char *data, int len, int index, int use_glyph_bbox);
+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);
diff --git a/include/mupdf/pdf/font.h b/include/mupdf/pdf/font.h
index ce140051..5b1cd8cd 100644
--- a/include/mupdf/pdf/font.h
+++ b/include/mupdf/pdf/font.h
@@ -105,7 +105,7 @@ void pdf_load_to_unicode(pdf_document *doc, pdf_font_desc *font, char **strings,
int pdf_font_cid_to_gid(fz_context *ctx, pdf_font_desc *fontdesc, int cid);
-unsigned char *pdf_lookup_builtin_font(char *name, unsigned int *len);
+unsigned char *pdf_lookup_builtin_font(const char *name, unsigned int *len);
unsigned char *pdf_lookup_substitute_font(int mono, int serif, int bold, int italic, unsigned int *len);
unsigned char *pdf_lookup_substitute_cjk_font(int ros, int serif, unsigned int *len);
diff --git a/source/fitz/font.c b/source/fitz/font.c
index d8ee7b49..2e2cd53b 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -13,7 +13,7 @@
static void fz_drop_freetype(fz_context *ctx);
static fz_font *
-fz_new_font(fz_context *ctx, char *name, int use_glyph_bbox, int glyph_count)
+fz_new_font(fz_context *ctx, const char *name, int use_glyph_bbox, int glyph_count)
{
fz_font *font;
int i;
@@ -315,7 +315,7 @@ fz_drop_freetype(fz_context *ctx)
}
fz_font *
-fz_new_font_from_file(fz_context *ctx, char *name, char *path, int index, int use_glyph_bbox)
+fz_new_font_from_file(fz_context *ctx, const char *name, const char *path, int index, int use_glyph_bbox)
{
FT_Face face;
fz_font *font;
@@ -347,7 +347,7 @@ fz_new_font_from_file(fz_context *ctx, char *name, char *path, int index, int us
}
fz_font *
-fz_new_font_from_memory(fz_context *ctx, char *name, unsigned char *data, int len, int index, int use_glyph_bbox)
+fz_new_font_from_memory(fz_context *ctx, const char *name, unsigned char *data, int len, int index, int use_glyph_bbox)
{
FT_Face face;
fz_font *font;
@@ -379,7 +379,7 @@ fz_new_font_from_memory(fz_context *ctx, char *name, unsigned char *data, int le
}
fz_font *
-fz_new_font_from_buffer(fz_context *ctx, char *name, fz_buffer *buffer, int index, int use_glyph_bbox)
+fz_new_font_from_buffer(fz_context *ctx, const char *name, fz_buffer *buffer, int index, int use_glyph_bbox)
{
fz_font *font = fz_new_font_from_memory(ctx, name, buffer->data, buffer->len, index, use_glyph_bbox);
font->ft_buffer = fz_keep_buffer(ctx, buffer); /* remember buffer so we can drop it when we free the font */
@@ -957,7 +957,7 @@ fz_outline_ft_glyph(fz_context *ctx, fz_font *font, int gid, const fz_matrix *tr
*/
fz_font *
-fz_new_type3_font(fz_context *ctx, char *name, const fz_matrix *matrix)
+fz_new_type3_font(fz_context *ctx, const char *name, const fz_matrix *matrix)
{
fz_font *font;
int i;
diff --git a/source/pdf/pdf-fontfile.c b/source/pdf/pdf-fontfile.c
index c9eb94be..2e33768d 100644
--- a/source/pdf/pdf-fontfile.c
+++ b/source/pdf/pdf-fontfile.c
@@ -33,7 +33,7 @@
#endif
unsigned char *
-pdf_lookup_builtin_font(char *name, unsigned int *len)
+pdf_lookup_builtin_font(const char *name, unsigned int *len)
{
if (!strcmp("Courier", name)) {
*len = sizeof pdf_font_NimbusMon_Reg;