diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-01-27 15:25:23 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-01-28 20:09:53 +0000 |
commit | 89559a410d5e79e0922128f90171935c6d55341a (patch) | |
tree | be969b16cb8af1a01134adc32ccbfc924a391991 /platform | |
parent | dadef8ae9ca208d4c02516fd8e73606fd1e7863c (diff) | |
download | mupdf-89559a410d5e79e0922128f90171935c6d55341a.tar.xz |
Add Noto fallback fonts.
Look up fallback fonts by unicode script, with a flag to select the serif or
sans-serif font style where such variants exist.
Move all builtin fonts into fitz namespace.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/gl/gl-font.c | 6 | ||||
-rw-r--r-- | platform/win32/generate.bat | 1 | ||||
-rw-r--r-- | platform/win32/generated.vcproj | 2 | ||||
-rw-r--r-- | platform/win32/libmupdf.vcproj | 8 |
4 files changed, 8 insertions, 9 deletions
diff --git a/platform/gl/gl-font.c b/platform/gl/gl-font.c index efba4d98..80d0d27e 100644 --- a/platform/gl/gl-font.c +++ b/platform/gl/gl-font.c @@ -14,8 +14,6 @@ #include "gl-app.h" -#include "mupdf/pdf.h" /* for builtin fonts */ - #include <ft2build.h> #include FT_FREETYPE_H #include FT_ADVANCES_H @@ -101,12 +99,12 @@ void ui_init_fonts(fz_context *ctx, float pixelsize) clear_font_cache(); - data = pdf_lookup_builtin_font(ctx, "Times-Roman", &size); + data = fz_lookup_base14_font(ctx, "Times-Roman", &size); code = FT_New_Memory_Face(g_freetype_lib, data, size, 0, &g_font); if (code) fz_throw(ctx, FZ_ERROR_GENERIC, "cannot load ui font"); - data = pdf_lookup_substitute_cjk_font(ctx, 0, 0, 0, &size, &index); + data = fz_lookup_cjk_font(ctx, 0, 0, 0, &size, &index); code = FT_New_Memory_Face(g_freetype_lib, data, size, 0, &g_fallback_font); if (code) fz_throw(ctx, FZ_ERROR_GENERIC, "cannot load ui fallback font"); diff --git a/platform/win32/generate.bat b/platform/win32/generate.bat index e7fcadae..e1461269 100644 --- a/platform/win32/generate.bat +++ b/platform/win32/generate.bat @@ -22,6 +22,7 @@ if not exist cquote.exe goto usage if not exist bin2hex.exe goto usage if not exist generated/gen_font_base14.h fontdump.exe generated/gen_font_base14.h resources/fonts/urw/*.cff +if not exist generated/gen_font_noto.h fontdump.exe generated/gen_font_noto.h resources/fonts/noto/*.ttf if not exist generated/gen_font_cjk.h fontdump.exe generated/gen_font_cjk.h resources/fonts/droid/DroidSansFallback.ttc if not exist generated/gen_font_cjk_full.h fontdump.exe generated/gen_font_cjk_full.h resources/fonts/droid/DroidSansFallbackFull.ttc diff --git a/platform/win32/generated.vcproj b/platform/win32/generated.vcproj index 063f997c..6e00ba9c 100644 --- a/platform/win32/generated.vcproj +++ b/platform/win32/generated.vcproj @@ -206,7 +206,7 @@ > </File> <File - RelativePath="..\..\generated\gen_font_droid.h" + RelativePath="..\..\generated\gen_font_noto.h" > </File> <File diff --git a/platform/win32/libmupdf.vcproj b/platform/win32/libmupdf.vcproj index 460a7442..038d77e6 100644 --- a/platform/win32/libmupdf.vcproj +++ b/platform/win32/libmupdf.vcproj @@ -947,6 +947,10 @@ > </File> <File + RelativePath="..\..\source\fitz\noto.c" + > + </File> + <File RelativePath="..\..\source\fitz\outline.c" > </File> @@ -1155,10 +1159,6 @@ > </File> <File - RelativePath="..\..\source\pdf\pdf-fontfile.c" - > - </File> - <File RelativePath="..\..\source\pdf\pdf-form.c" > </File> |