diff --git a/buildScripts/buildPdf2htmlEX b/buildScripts/buildPdf2htmlEX
index daa62a3..e5452b6 100755
--- a/buildScripts/buildPdf2htmlEX
+++ b/buildScripts/buildPdf2htmlEX
@@ -2,9 +2,13 @@
# This shell script builds pdf2htmlEX
+# source ./buildScripts/reSourceVersionEnvs
+. ./buildScripts/reSourceVersionEnvs
+
echo ""
echo "-------------------------------------------------------------------"
echo "BUILDING pdf2htmlEX (using gcc)"
+echo " PDF2HTMLEX_VERSION = [$PDF2HTMLEX_VERSION]"
echo "-------------------------------------------------------------------"
echo ""
diff --git a/buildScripts/buildPoppler b/buildScripts/buildPoppler
index 4583ccb..8c0df80 100755
--- a/buildScripts/buildPoppler
+++ b/buildScripts/buildPoppler
@@ -40,7 +40,7 @@ cmake \
-DWITH_JPEG=ON \
-DWITH_PNG=ON \
-DWITH_TIFF=OFF \
- -DWITH_NSS=OFF \
+ -DWITH_NSS3=OFF \
-DWITH_Cairo=ON \
..
diff --git a/buildScripts/createDockerAlpineImageFromTarFile b/buildScripts/createDockerAlpineImageFromTarFile
index a67d63f..5f4d5b4 100755
--- a/buildScripts/createDockerAlpineImageFromTarFile
+++ b/buildScripts/createDockerAlpineImageFromTarFile
@@ -59,6 +59,11 @@ WORKDIR /root
RUN chmod a+x $ALPINE_NAME.install && \
./$ALPINE_NAME.install
+
+# make the /pdf directory the default working directory for any run of
+# pdf2htmlEX
+#
+WORKDIR /pdf
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
DOCKERFILE_HERE_DOC
diff --git a/buildScripts/createDockerUbuntuImageFromDeb b/buildScripts/createDockerUbuntuImageFromDeb
index b5db6af..f779290 100755
--- a/buildScripts/createDockerUbuntuImageFromDeb
+++ b/buildScripts/createDockerUbuntuImageFromDeb
@@ -59,7 +59,12 @@ COPY ./$DPKG_NAME /root
RUN apt update && \
apt -y upgrade && \
apt -y --no-install-recommends install \
- /root/$DPKG_NAME
+ /root/$DPKG_NAME
+
+# make the /pdf directory the default working directory for any run of
+# pdf2htmlEX
+#
+WORKDIR /pdf
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
DOCKERFILE_HERE_DOC
diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs
index 00ac4b6..53a58ac 100755
--- a/buildScripts/versionEnvs
+++ b/buildScripts/versionEnvs
@@ -6,7 +6,7 @@
# see: https://poppler.freedesktop.org/releases.html
# current working: 0.83.0
-export PDF2HTMLEX_VERSION=0.18.8.alpha
+export PDF2HTMLEX_VERSION=0.18.8.rc1
export POPPLER_VERSION=poppler-0.89.0
#export POPPLER_VERSION=poppler-0.88.0
diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt
index 218c54d..b5cb520 100644
--- a/pdf2htmlEX/CMakeLists.txt
+++ b/pdf2htmlEX/CMakeLists.txt
@@ -10,7 +10,11 @@ option(ENABLE_SVG "Enable SVG support, for generating SVG background images and
include_directories(${CMAKE_SOURCE_DIR}/src)
-set(PDF2HTMLEX_VERSION "0.18.7")
+# Read/Set Cmake's PDF2HTMLEX_VERSION directly from the shell environment
+# variable PDF2HTMLEX_VERSION
+#
+set(PDF2HTMLEX_VERSION $ENV{PDF2HTMLEX_VERSION})
+#
set(ARCHIVE_NAME pdf2htmlex-${PDF2HTMLEX_VERSION})
add_custom_target(dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
diff --git a/pdf2htmlEX/CMakeLists.txt.patch b/pdf2htmlEX/CMakeLists.txt.patch
deleted file mode 100644
index 7d70e4a..0000000
--- a/pdf2htmlEX/CMakeLists.txt.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 135e02f..97c7035 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,6 +7,7 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
-
- option(ENABLE_SVG "Enable SVG support, for generating SVG background images and converting Type 3 fonts" ON)
-
-+include_directories(${CMAKE_INSTALL_PREFIX}/include)
- include_directories(${CMAKE_SOURCE_DIR}/src)
-
- set(PDF2HTMLEX_VERSION "0.15.0")
diff --git a/pdf2htmlEX/pdf2htmlEX.1.in b/pdf2htmlEX/pdf2htmlEX.1.in
index 570997c..fe4f661 100644
--- a/pdf2htmlEX/pdf2htmlEX.1.in
+++ b/pdf2htmlEX/pdf2htmlEX.1.in
@@ -174,6 +174,10 @@ Specify the format of fonts extracted from the PDF file.
.B \-\-decompose\-ligature <0|1> (Default: 0)
Decompose ligatures. For example 'fi' \-> 'f''i'.
+.TP
+.B \-\-turn\-off\-ligatures <0|1> (Default: 0)
+Explicitly tell browsers not to use ligatures.
+
.TP
.B \-\-auto\-hint <0|1> (Default: 0)
If set to 1, hints will be generated for the fonts using FontForge.
diff --git a/pdf2htmlEX/src/HTMLRenderer/font.cc b/pdf2htmlEX/src/HTMLRenderer/font.cc
index 466f691..b93e9be 100644
--- a/pdf2htmlEX/src/HTMLRenderer/font.cc
+++ b/pdf2htmlEX/src/HTMLRenderer/font.cc
@@ -1001,6 +1001,10 @@ void HTMLRenderer::install_external_font(GfxFont * font, FontInfo & info)
void HTMLRenderer::export_remote_font(const FontInfo & info, const string & format, GfxFont * font)
{
+ string css_turn_off_ligatures = "";
+ if (param.turn_off_ligatures) {
+ css_turn_off_ligatures = "font-variant-ligatures:none;font-feature-settings: \"liga\" 0, \"clig\" 0, \"dlig\" 0, \"hlig\" 0, \"calt\" 0;";
+ }
string css_font_format;
if(format == "ttf")
{
@@ -1062,6 +1066,7 @@ void HTMLRenderer::export_remote_font(const FontInfo & info, const string & form
<< "font-style:normal;"
<< "font-weight:normal;"
<< "visibility:visible;"
+ << css_turn_off_ligatures
<< "}"
<< endl;
}
diff --git a/pdf2htmlEX/src/Param.h b/pdf2htmlEX/src/Param.h
index 9189f49..859c78b 100644
--- a/pdf2htmlEX/src/Param.h
+++ b/pdf2htmlEX/src/Param.h
@@ -51,6 +51,7 @@ struct Param
int embed_external_font;
std::string font_format;
int decompose_ligature;
+ int turn_off_ligatures;
int auto_hint;
std::string external_hint_tool;
int stretch_narrow_glyph;
diff --git a/pdf2htmlEX/src/pdf2htmlEX.cc b/pdf2htmlEX/src/pdf2htmlEX.cc
index 7197e51..d77fb83 100644
--- a/pdf2htmlEX/src/pdf2htmlEX.cc
+++ b/pdf2htmlEX/src/pdf2htmlEX.cc
@@ -170,6 +170,7 @@ void parse_options (int argc, char **argv)
.add("embed-external-font", ¶m.embed_external_font, 1, "embed local match for external fonts")
.add("font-format", ¶m.font_format, "woff", "suffix for embedded font files (ttf,otf,woff,svg)")
.add("decompose-ligature", ¶m.decompose_ligature, 0, "decompose ligatures, such as \uFB01 -> fi")
+ .add("turn-off-ligatures", ¶m.turn_off_ligatures, 0, "explicitly tell browsers not to use ligatures")
.add("auto-hint", ¶m.auto_hint, 0, "use fontforge autohint on fonts without hints")
.add("external-hint-tool", ¶m.external_hint_tool, "", "external tool for hinting fonts (overrides --auto-hint)")
.add("stretch-narrow-glyph", ¶m.stretch_narrow_glyph, 0, "stretch narrow glyphs instead of padding them")