diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | Makethird | 63 | ||||
-rw-r--r-- | platform/win32/libmupdf.vcproj | 18 | ||||
-rw-r--r-- | platform/win32/libthirdparty.vcproj | 200 | ||||
m--------- | thirdparty/harfbuzz | 0 |
6 files changed, 272 insertions, 16 deletions
diff --git a/.gitmodules b/.gitmodules index d374bcb4..13da2e4a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,6 +7,9 @@ [submodule "thirdparty/freetype"] path = thirdparty/freetype url = git://git.ghostscript.com/thirdparty/freetype.git +[submodule "thirdparty/harfbuzz"] + path = thirdparty/harfbuzz + url = git://git.ghostscript.com/thirdparty/harfbuzz.git [submodule "thirdparty/jpeg"] path = thirdparty/jpeg url = git://git.ghostscript.com/thirdparty/jpeg.git @@ -19,6 +19,7 @@ CFLAGS += $(XCFLAGS) -Iinclude -I$(GEN) LIBS += $(XLIBS) -lm LIBS += $(FREETYPE_LIBS) +LIBS += $(HARFBUZZ_LIBS) LIBS += $(JBIG2DEC_LIBS) LIBS += $(JPEG_LIBS) LIBS += $(MUJS_LIBS) @@ -27,6 +28,7 @@ LIBS += $(OPENSSL_LIBS) LIBS += $(ZLIB_LIBS) CFLAGS += $(FREETYPE_CFLAGS) +CFLAGS += $(HARFBUZZ_CFLAGS) CFLAGS += $(JBIG2DEC_CFLAGS) CFLAGS += $(JPEG_CFLAGS) CFLAGS += $(MUJS_CFLAGS) @@ -112,7 +114,7 @@ MUPDF_LIB = $(OUT)/libmupdf.a THIRD_LIB = $(OUT)/libmupdfthird.a MUPDF_OBJ := $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ) -THIRD_OBJ := $(FREETYPE_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ) +THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ) $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) : $(THIRD_OBJ) @@ -7,6 +7,7 @@ # out the thirdparty libraries from git. FREETYPE_DIR := thirdparty/freetype +HARFBUZZ_DIR := thirdparty/harfbuzz JBIG2DEC_DIR := thirdparty/jbig2dec JPEG_DIR := thirdparty/jpeg MUJS_DIR := thirdparty/mujs @@ -102,6 +103,68 @@ FREETYPE_CFLAGS := $(SYS_FREETYPE_CFLAGS) FREETYPE_LIBS := $(SYS_FREETYPE_LIBS) endif +# --- HarfBuzz --- + +ifneq "$(wildcard $(HARFBUZZ_DIR)/README)" "" + +HARFBUZZ_OUT := $(OUT)/harfbuzz +HARFBUZZ_SRC := \ + hb-blob.cc \ + hb-buffer.cc \ + hb-buffer-serialize.cc \ + hb-common.cc \ + hb-face.cc \ + hb-fallback-shape.cc \ + hb-font.cc \ + hb-ft.cc \ + hb-ot-font.cc \ + hb-ot-layout.cc \ + hb-ot-map.cc \ + hb-ot-shape-complex-arabic.cc \ + hb-ot-shape-complex-default.cc \ + hb-ot-shape-complex-hangul.cc \ + hb-ot-shape-complex-hebrew.cc \ + hb-ot-shape-complex-indic-table.cc \ + hb-ot-shape-complex-indic.cc \ + hb-ot-shape-complex-myanmar.cc \ + hb-ot-shape-complex-thai.cc \ + hb-ot-shape-complex-tibetan.cc \ + hb-ot-shape-complex-use-table.cc \ + hb-ot-shape-complex-use.cc \ + hb-ot-shape-fallback.cc \ + hb-ot-shape-normalize.cc \ + hb-ot-shape.cc \ + hb-ot-tag.cc \ + hb-set.cc \ + hb-shape-plan.cc \ + hb-shape.cc \ + hb-shaper.cc \ + hb-ucdn.cc \ + hb-unicode.cc \ + hb-warning.cc + +# hb-coretext.cc +# hb-directwrite.cc +# hb-glib.cc +# hb-gobject-structs.cc +# hb-graphite2.cc +# hb-icu.cc +# hb-uniscribe.cc + +HARFBUZZ_OBJ := $(addprefix $(HARFBUZZ_OUT)/, $(HARFBUZZ_SRC:%.cc=%.o)) + +$(HARFBUZZ_OUT): + $(MKDIR_CMD) +$(HARFBUZZ_OUT)/%.o: $(HARFBUZZ_DIR)/src/%.cc | $(HARFBUZZ_OUT) + $(CC_CMD) -DHAVE_OT -DHAVE_UCDN -DHB_NO_MT $(FREETYPE_CFLAGS) \ + -fno-rtti -fno-exceptions -fvisibility-inlines-hidden --std=c++0x + +HARFBUZZ_CFLAGS := -I$(HARFBUZZ_DIR)/src +else +HARFBUZZ_CFLAGS := $(SYS_HARFBUZZ_CFLAGS) +HARFBUZZ_LIBS := $(SYS_HARFBUZZ_LIBS) +endif + # --- JBIG2DEC --- ifneq "$(wildcard $(JBIG2DEC_DIR)/README)" "" diff --git a/platform/win32/libmupdf.vcproj b/platform/win32/libmupdf.vcproj index 038d77e6..9dd64b6f 100644 --- a/platform/win32/libmupdf.vcproj +++ b/platform/win32/libmupdf.vcproj @@ -43,7 +43,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs;..\..\thirdparty\harfbuzz\src" PreprocessorDefinitions="FZ_LARGEFILE;DEBUG=1;USE_OUTPUT_DEBUG_STRING" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -172,7 +172,7 @@ Optimization="2" EnableIntrinsicFunctions="true" WholeProgramOptimization="false" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs;..\..\thirdparty\harfbuzz\src" RuntimeLibrary="0" EnableFunctionLevelLinking="true" WarningLevel="3" @@ -296,7 +296,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs;..\..\thirdparty\harfbuzz\src" PreprocessorDefinitions="FZ_LARGEFILE;MEMENTO=1;DEBUG=1;USE_OUTPUT_DEBUG_STRING" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -421,7 +421,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\openssl\include;..\..\thirdparty\mujs" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\openssl\include;..\..\thirdparty\mujs;..\..\thirdparty\harfbuzz\src" PreprocessorDefinitions="FZ_LARGEFILE;DEBUG=1;HAVE_OPENSSL;USE_OUTPUT_DEBUG_STRING" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -549,7 +549,7 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\include;..\..\ucdn;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\mujs;..\..\thirdparty\harfbuzz\src" RuntimeLibrary="0" EnableFunctionLevelLinking="true" WarningLevel="3" @@ -1067,10 +1067,6 @@ > </File> <File - RelativePath="..\..\source\fitz\ucdn.h" - > - </File> - <File RelativePath="..\..\source\fitz\unicodedata_db.h" > </File> @@ -1562,6 +1558,10 @@ > </File> <File + RelativePath="..\..\include\mupdf\fitz\ucdn.h" + > + </File> + <File RelativePath="..\..\include\mupdf\fitz\unzip.h" > </File> diff --git a/platform/win32/libthirdparty.vcproj b/platform/win32/libthirdparty.vcproj index e2f0c59f..934a88f3 100644 --- a/platform/win32/libthirdparty.vcproj +++ b/platform/win32/libthirdparty.vcproj @@ -42,8 +42,8 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\freetype\include\freetype" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\";DEBUG=1;verbose=-1;JBIG_EXTERNAL_MEMENTO_H=\"memento.h\"" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\freetype\include\freetype;..\..\include\" + PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\";DEBUG=1;verbose=-1;JBIG_EXTERNAL_MEMENTO_H=\"memento.h\";HAVE_OT;HAVE_UCDN;HB_NO_MT" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -167,8 +167,8 @@ Name="VCCLCompilerTool" Optimization="2" EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\freetype\include\freetype" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\";verbose=-1;JBIG_EXTERNAL_MEMENTO_H=\"memento.h\"" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\freetype\include\freetype;..\..\include\" + PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\";verbose=-1;JBIG_EXTERNAL_MEMENTO_H=\"memento.h\";HAVE_OT;HAVE_UCDN;HB_NO_MT" RuntimeLibrary="0" EnableFunctionLevelLinking="true" WarningLevel="3" @@ -290,8 +290,8 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\freetype\include\freetype" - PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\";MEMENTO=1;DEBUG=1;verbose=-1;JBIG_EXTERNAL_MEMENTO_H=\"memento.h\"" + AdditionalIncludeDirectories="..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;..\..\thirdparty\freetype\include\freetype;..\..\include\" + PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\";MEMENTO=1;DEBUG=1;verbose=-1;JBIG_EXTERNAL_MEMENTO_H=\"memento.h\";HAVE_OT;HAVE_UCDN;HB_NO_MT" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -1316,6 +1316,194 @@ > </File> </Filter> + <Filter + Name="harfbuzz" + > + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-blob.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-buffer-serialize.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-buffer.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-common.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-face.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-fallback-shape.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-font.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ft.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-layout.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-map.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-arabic.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-default.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-hangul.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-hebrew.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-indic-table.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-indic.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-myanmar.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-thai.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-tibetan.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-use-table.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-complex-use.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-fallback.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape-normalize.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-shape.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ot-tag.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-set.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-shape-plan.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-shape.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-shaper.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ucdn.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-unicode.cc" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-warning.cc" + > + </File> + <Filter + Name="include" + > + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-blob.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-buffer.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-common.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-deprecated.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-face.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-font.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-ft.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-set.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-shape-plan.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-shape.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-unicode.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb-version.h" + > + </File> + <File + RelativePath="..\..\thirdparty\harfbuzz\src\hb.h" + > + </File> + </Filter> + </Filter> </Files> <Globals> </Globals> diff --git a/thirdparty/harfbuzz b/thirdparty/harfbuzz new file mode 160000 +Subproject 7b98e93ea5e2d08377ec481006a87a3bc05df78 |