From 0b73a8ddf620894112cd212b43f5d4cccec9d90e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 30 May 2016 12:01:28 +0100 Subject: Add TOFU_BASE14 option. --- include/mupdf/fitz/config.h | 4 ++++ source/fitz/noto.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/mupdf/fitz/config.h b/include/mupdf/fitz/config.h index 47e5cd04..98262ac3 100644 --- a/include/mupdf/fitz/config.h +++ b/include/mupdf/fitz/config.h @@ -58,6 +58,10 @@ /* To skip the SIL fonts, enable: */ /* #define TOFU_SIL */ +/* To skip the Base14 fonts, enable: */ +/* #define TOFU_BASE14 */ +/* (You probably really don't want to do that except for measurement purposes!) */ + #ifndef FZ_PLOTTERS_G #define FZ_PLOTTERS_G 1 #endif /* FZ_PLOTTERS_G */ diff --git a/source/fitz/noto.c b/source/fitz/noto.c index c428c324..eb277ce5 100644 --- a/source/fitz/noto.c +++ b/source/fitz/noto.c @@ -44,6 +44,7 @@ const char * fz_lookup_base14_font(fz_context *ctx, const char *name, int *size) { +#ifndef TOFU_BASE14 if (!strcmp(name, "Courier")) { RETURN(NimbusMono_Regular_cff); } if (!strcmp(name, "Courier-Oblique")) { RETURN(NimbusMono_Oblique_cff); } if (!strcmp(name, "Courier-Bold")) { RETURN(NimbusMono_Bold_cff); } @@ -58,6 +59,7 @@ fz_lookup_base14_font(fz_context *ctx, const char *name, int *size) if (!strcmp(name, "Times-BoldItalic")) { RETURN(NimbusRomNo9L_MedIta_cff); } if (!strcmp(name, "Symbol")) { RETURN(StandardSymL_cff); } if (!strcmp(name, "ZapfDingbats")) { RETURN(Dingbats_cff); } +#endif return *size = 0, NULL; } @@ -71,6 +73,7 @@ fz_lookup_base14_font(fz_context *ctx, const char *name, int *size) const char * fz_lookup_builtin_font(fz_context *ctx, const char *name, int is_bold, int is_italic, int *size) { +#ifndef TOFU_BASE14 if (!strcmp(name, "Courier")) { FAMILY(NimbusMono_Regular_cff, NimbusMono_Oblique_cff, @@ -89,6 +92,7 @@ fz_lookup_builtin_font(fz_context *ctx, const char *name, int is_bold, int is_it NimbusRomNo9L_Med_cff, NimbusRomNo9L_MedIta_cff) } +#endif #ifndef TOFU_SIL if (!strcmp(name, "Charis SIL")) { FAMILY(CharisSIL_R_cff, -- cgit v1.2.3