summaryrefslogtreecommitdiff
path: root/pdf/pdf_font.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-03-13 13:57:11 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-03-13 13:57:11 +0100
commit48652e529ed1c0ae23cfd45f14d9655ad2849c89 (patch)
treea34e7562a30f3a7e42070f1f5a8763f6d1d608cb /pdf/pdf_font.c
parent9cbfb766564d0e80d259e3e0a919d72a75bbb6ee (diff)
downloadmupdf-48652e529ed1c0ae23cfd45f14d9655ad2849c89.tar.xz
Rename some functions and accessors to be more consistent.
Debug printing functions: debug -> print. Accessors: get noun attribute -> noun attribute. Find -> lookup when the returned value is not reference counted. pixmap_with_rect -> pixmap_with_bbox. We are reserving the word "find" to mean lookups that give ownership of objects to the caller. Lookup is used in other places where the ownership is not transferred, or simple values are returned. The rename is done by the sed script in scripts/rename3.sed
Diffstat (limited to 'pdf/pdf_font.c')
-rw-r--r--pdf/pdf_font.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pdf/pdf_font.c b/pdf/pdf_font.c
index 11c97d37..ab60af72 100644
--- a/pdf/pdf_font.c
+++ b/pdf/pdf_font.c
@@ -178,7 +178,7 @@ pdf_load_builtin_font(fz_context *ctx, pdf_font_desc *fontdesc, char *fontname)
unsigned char *data;
unsigned int len;
- data = pdf_find_builtin_font(fontname, &len);
+ data = pdf_lookup_builtin_font(fontname, &len);
if (!data)
fz_throw(ctx, "cannot find builtin font: '%s'", fontname);
@@ -195,7 +195,7 @@ pdf_load_substitute_font(fz_context *ctx, pdf_font_desc *fontdesc, int mono, int
unsigned char *data;
unsigned int len;
- data = pdf_find_substitute_font(mono, serif, bold, italic, &len);
+ data = pdf_lookup_substitute_font(mono, serif, bold, italic, &len);
if (!data)
fz_throw(ctx, "cannot find substitute font");
@@ -213,7 +213,7 @@ pdf_load_substitute_cjk_font(fz_context *ctx, pdf_font_desc *fontdesc, int ros,
unsigned char *data;
unsigned int len;
- data = pdf_find_substitute_cjk_font(ros, serif, &len);
+ data = pdf_lookup_substitute_cjk_font(ros, serif, &len);
if (!data)
fz_throw(ctx, "cannot find builtin CJK font");
@@ -789,7 +789,7 @@ load_cid_font(pdf_document *xref, pdf_obj *dict, pdf_obj *encoding, pdf_obj *to_
}
fontdesc->size += pdf_cmap_size(ctx, fontdesc->encoding);
- pdf_set_font_wmode(ctx, fontdesc, pdf_get_wmode(ctx, fontdesc->encoding));
+ pdf_set_font_wmode(ctx, fontdesc, pdf_cmap_wmode(ctx, fontdesc->encoding));
if (kind == TRUETYPE)
{
@@ -881,7 +881,7 @@ load_cid_font(pdf_document *xref, pdf_obj *dict, pdf_obj *encoding, pdf_obj *to_
/* Vertical */
- if (pdf_get_wmode(ctx, fontdesc->encoding) == 1)
+ if (pdf_cmap_wmode(ctx, fontdesc->encoding) == 1)
{
int dw2y = 880;
int dw2w = -1000;
@@ -1127,7 +1127,7 @@ pdf_load_font(pdf_document *xref, pdf_obj *rdb, pdf_obj *dict)
}
void
-pdf_debug_font(fz_context *ctx, pdf_font_desc *fontdesc)
+pdf_print_font(fz_context *ctx, pdf_font_desc *fontdesc)
{
int i;