diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-02-17 13:13:35 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-02-20 12:47:15 +0100 |
commit | f19daf828bd69fd0d78657208b56b44fa707d065 (patch) | |
tree | e688602ca8f10df04194ac230502f9faa7afd1aa /source/fitz/font.c | |
parent | 46159e8297d649695f36ad3816ca53ce4311c276 (diff) | |
download | mupdf-f19daf828bd69fd0d78657208b56b44fa707d065.tar.xz |
Add fz_font_is_bold and italic functions. Use them for svg output.
Diffstat (limited to 'source/fitz/font.c')
-rw-r--r-- | source/fitz/font.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c index 9a594cff..31877d67 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -1570,6 +1570,26 @@ fz_encode_character_with_fallback(fz_context *ctx, fz_font *user_font, int unico return *out_font = user_font, 0; } +int fz_font_is_bold(fz_context *ctx, fz_font *font) +{ + return font ? font->flags.is_bold : 0; +} + +int fz_font_is_italic(fz_context *ctx, fz_font *font) +{ + return font ? font->flags.is_italic : 0; +} + +int fz_font_is_serif(fz_context *ctx, fz_font *font) +{ + return font ? font->flags.is_serif : 0; +} + +int fz_font_is_monospaced(fz_context *ctx, fz_font *font) +{ + return font ? font->flags.is_mono : 0; +} + const char *fz_font_name(fz_context *ctx, fz_font *font) { return font ? font->name : ""; |