mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-09-17 05:16:02 +00:00
Merge pull request #33 from stephengaito/multipleSmallFixes
Multiple small fixes add fixes for pdf2htmlEX/pdf2htmlEX issues 70, 69, 68, 66, and 65 tested and corrected pdf2htmlEX/pdf2htmlEX issue 68 and 66
This commit is contained in:
commit
0573a78bb6
@ -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 ""
|
||||
|
@ -40,7 +40,7 @@ cmake \
|
||||
-DWITH_JPEG=ON \
|
||||
-DWITH_PNG=ON \
|
||||
-DWITH_TIFF=OFF \
|
||||
-DWITH_NSS=OFF \
|
||||
-DWITH_NSS3=OFF \
|
||||
-DWITH_Cairo=ON \
|
||||
..
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user