summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-09-02 13:17:58 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-09-02 13:17:58 +0200
commitfe9590a171411226d34b6ffcdc71db6f6b799e4d (patch)
treeed3b569b78465f7921ccc9d1415d956dee56a425
parent5188deb477905cab4eb48a174234d4b9a5111549 (diff)
downloadmupdf-fe9590a171411226d34b6ffcdc71db6f6b799e4d.tar.xz
Add Droid Sans Mono as a substitute font.
-rw-r--r--Makefile2
-rw-r--r--fonts/droid/DroidSansMono.ttfbin0 -> 119380 bytes
-rw-r--r--pdf/pdf_fontfile.c9
3 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 97d3f363..c798d350 100644
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,7 @@ CMAP_GB_SRC := $(wildcard cmaps/gb/*)
CMAP_JAPAN_SRC := $(wildcard cmaps/japan/*)
CMAP_KOREA_SRC := $(wildcard cmaps/korea/*)
FONT_BASE14_SRC := $(wildcard fonts/*.cff)
-FONT_DROID_SRC := fonts/droid/DroidSans.ttf
+FONT_DROID_SRC := fonts/droid/DroidSans.ttf fonts/droid/DroidSansMono.ttf
FONT_CJK_SRC := fonts/droid/DroidSansFallback.ttf
$(GEN)/cmap_cns.h : $(CMAP_CNS_SRC)
diff --git a/fonts/droid/DroidSansMono.ttf b/fonts/droid/DroidSansMono.ttf
new file mode 100644
index 00000000..a0070719
--- /dev/null
+++ b/fonts/droid/DroidSansMono.ttf
Binary files differ
diff --git a/pdf/pdf_fontfile.c b/pdf/pdf_fontfile.c
index 55f883f1..fb85bee4 100644
--- a/pdf/pdf_fontfile.c
+++ b/pdf/pdf_fontfile.c
@@ -116,8 +116,13 @@ pdf_find_substitute_font(int mono, int serif, int bold, int italic, unsigned int
}
}
#else
- *len = sizeof pdf_font_DroidSans;
- return (unsigned char*) pdf_font_DroidSans;
+ if (mono) {
+ *len = sizeof pdf_font_DroidSansMono;
+ return (unsigned char*) pdf_font_DroidSansMono;
+ } else {
+ *len = sizeof pdf_font_DroidSans;
+ return (unsigned char*) pdf_font_DroidSans;
+ }
#endif
}