summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2014-02-22 19:37:57 +0100
committerRobin Watts <robin.watts@artifex.com>2014-02-25 12:15:16 +0000
commitb9f7b021f320c8f6b4879ddc20acf11976bd5add (patch)
treed7922e432322755228a25a67c162e54a5422f4c2 /source/fitz
parent39d56f84b386d1c5de13792fde8371c617466744 (diff)
downloadmupdf-b9f7b021f320c8f6b4879ddc20acf11976bd5add.tar.xz
Bug 694851: pass more information to fz_load_system_font
The following changes allow font providers to make better choices WRT what font to provide and under what circumstances: * bold and italic flags are passed in so that implementors can decide themselves whether to ask for simulated boldening/italicising if a font claims not to be bold/italic * is_substitute is replaced with needs_exact_metrics to make the meaning of this argument hopefully clearer (that argument is set only for PDF fonts without a FontDescriptor) * the font name is always passed as requested by the document instead of the cleaned name for the standard 14 fonts which allows distinguishing e.g. Symbol and Symbol,Bold
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c
index 45d75f95..4e676361 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -240,7 +240,7 @@ void fz_install_load_system_font_funcs(fz_context *ctx, fz_load_system_font_func
ctx->font->load_cjk_font = f_cjk;
}
-fz_font *fz_load_system_font(fz_context *ctx, const char *name, int is_substitute)
+fz_font *fz_load_system_font(fz_context *ctx, const char *name, int bold, int italic, int needs_exact_metrics)
{
fz_font *font = NULL;
@@ -248,7 +248,7 @@ fz_font *fz_load_system_font(fz_context *ctx, const char *name, int is_substitut
{
fz_try(ctx)
{
- font = ctx->font->load_font(ctx, name, is_substitute);
+ font = ctx->font->load_font(ctx, name, bold, italic, needs_exact_metrics);
}
fz_catch(ctx)
{