1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

Merge pull request #16 from stephengaito/fontforge20200314

Fontforge20200314
Updated FontForge dependency to the most recent version (20200314)
This commit is contained in:
stephengaito 2020-05-30 08:50:28 +01:00 committed by GitHub
commit 1f717346b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 44 additions and 74 deletions

View File

@ -6,50 +6,25 @@ source buildScripts/reSourceVersionEnvs
echo "" echo ""
echo "-------------------------------------------------------------------" echo "-------------------------------------------------------------------"
echo "BUILDING FontForge" echo "BUILDING FontForge (using CMake)"
echo "-------------------------------------------------------------------" echo "-------------------------------------------------------------------"
echo "" echo ""
# This is a work-around to fix TravisCI's declaration of PYTHON_CFLAGS
# which is then honoured exactly as is by the fontforge bootstrap and
# configure steps.
#
# see: https://github.com/travis-ci/travis-ci/issues/5301 (unfixed)
#
echo ""
echo "PYTHON_CFLAGS:"
echo "-------------------------------"
export PYTHON_CFLAGS="$(python3-config --cflags) $PYTHON_CFLAGS"
echo $PYTHON_CFLAGS
echo "-------------------------------"
echo ""
echo ""
echo "PYTHON_LIBS:"
echo "-------------------------------"
export PYTHON_LIBS="$(python3-config --ldflags) $PYTHON_LIBS"
echo $PYTHON_LIBS
echo "-------------------------------"
echo ""
# Can use "configure --disable-silent-rules" to debug configuration/make
# problems
#
cd fontforge cd fontforge
./bootstrap mkdir build
./configure \ cd build
--prefix=$PDF2HTMLEX_PREFIX \
--enable-python-scripting=3 \ cmake \
--disable-dependency-tracking \ -DCMAKE_BUILD_TYPE=Release \
--disable-silent-rules \ -DBUILD_SHARED_LIBS:BOOL=OFF \
--disable-python-scripting \ -DCMAKE_INSTALL_PREFIX=$PDF2HTMLEX_PREFIX \
--disable-python-extension \ -DENABLE_GUI:BOOL=OFF \
--disable-shared \ -DENABLE_X11:BOOL=OFF \
--enable-static \ -DENABLE_PYTHON_SCRIPTING:BOOL=OFF \
--with-pic \ -DENABLE_PYTHON_EXTENSION:AUTO=OFF \
--without-x ..
# Apply any patches required for fontforge raw sources before we make # Apply any patches required for fontforge raw sources before we make
# #

View File

@ -34,14 +34,10 @@ export PDF2HTMLEX_PREFIX=/usr/local
./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; } ./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; }
#./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }
./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; } ./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; }
./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; } ./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; }
#./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }
./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; } ./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; }
./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; } ./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; }

View File

@ -32,8 +32,10 @@ make install prefix=$PDF2HTMLEX_PREFIX DESTDIR=../imageBuild/appDir
cd ../imageBuild cd ../imageBuild
# force libfontconfig into AppImage (linuxdeploy blacklists libfontconfig) # force libfontconfig into AppImage (linuxdeploy blacklists libfontconfig)
# (turned off since libfontconfig needs to be matched to the underlying
# OS's collection of fonts and /etc/fonts configuration files)
# #
cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 appDir/usr/lib/ #cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 appDir/usr/lib/
LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage

View File

@ -20,8 +20,8 @@ export POPPLER_VERSION=poppler-0.83.0
# see: https://github.com/fontforge/fontforge/releases # see: https://github.com/fontforge/fontforge/releases
# current working: 20190801 # current working: 20190801
#export FONTFORGE_VERSION=20200314 export FONTFORGE_VERSION=20200314
export FONTFORGE_VERSION=20190801 #export FONTFORGE_VERSION=20190801
#export FONTFORGE_VERSION=20190413 #export FONTFORGE_VERSION=20190413
#export FONTFORGE_VERSION=20190413 #export FONTFORGE_VERSION=20190413
#export FONTFORGE_VERSION=20190317 #export FONTFORGE_VERSION=20190317

View File

@ -73,9 +73,7 @@ include_directories(
include_directories(${FONTFORGE_INCLUDE_DIRS}) include_directories(${FONTFORGE_INCLUDE_DIRS})
link_directories(${FONTFORGE_LIBRARY_DIRS}) link_directories(${FONTFORGE_LIBRARY_DIRS})
set(FONTFORGE_LIBRARIES ${FONTFORGE_LIBRARIES} set(FONTFORGE_LIBRARIES ${FONTFORGE_LIBRARIES}
${CMAKE_SOURCE_DIR}/../fontforge/fontforge/.libs/libfontforge.a ${CMAKE_SOURCE_DIR}/../fontforge/build/lib/libfontforge.a
${CMAKE_SOURCE_DIR}/../fontforge/Unicode/.libs/libgunicode.a
${CMAKE_SOURCE_DIR}/../fontforge/gutils/.libs/libgutils.a
) )
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS}

View File

@ -63,8 +63,6 @@ void show_version_and_exit(const char * dummy = nullptr)
cerr << "Copyright 2012-2015 Lu Wang <coolwanglu@gmail.com> and other contributors" << endl; cerr << "Copyright 2012-2015 Lu Wang <coolwanglu@gmail.com> and other contributors" << endl;
cerr << "Libraries: " << endl; cerr << "Libraries: " << endl;
cerr << " poppler " << POPPLER_VERSION << endl; cerr << " poppler " << POPPLER_VERSION << endl;
cerr << " libfontforge " << ffwVersionInfo->majorVersion << "." <<
ffwVersionInfo->minorVersion << "." << ffwVersionInfo->gitVersion << endl;
cerr << " libfontforge (date) " << ffwVersionInfo->versionDate << endl; cerr << " libfontforge (date) " << ffwVersionInfo->versionDate << endl;
#if ENABLE_SVG #if ENABLE_SVG
cerr << " cairo " << cairo_version_string() << endl; cerr << " cairo " << cairo_version_string() << endl;

View File

@ -157,7 +157,6 @@ void setupSignalHandler(
detailInfo = detailInfo + "\n"; detailInfo = detailInfo + "\n";
detailInfo = detailInfo + "Libraries:\n" ; detailInfo = detailInfo + "Libraries:\n" ;
detailInfo = detailInfo + " poppler " + POPPLER_VERSION + "\n"; detailInfo = detailInfo + " poppler " + POPPLER_VERSION + "\n";
detailInfo = detailInfo + " libfontforge " + ffwVersionInfo->majorVersion + "." + ffwVersionInfo->minorVersion + "." + ffwVersionInfo->gitVersion + "\n";
detailInfo = detailInfo + " libfontforge (date) " + ffwVersionInfo->versionDate + "\n"; detailInfo = detailInfo + " libfontforge (date) " + ffwVersionInfo->versionDate + "\n";
#if ENABLE_SVG #if ENABLE_SVG
detailInfo = detailInfo + " cairo " + cairo_version_string() + "\n"; detailInfo = detailInfo + " cairo " + cairo_version_string() + "\n";

View File

@ -18,21 +18,20 @@
#include "SignalHandler.h" #include "SignalHandler.h"
#include "ffw.h" // needed for: #include "ffw.h" // needed for:
#include "gfile.h" // FindProgDir #include "gfile.h" // FindProgDir
#include "fontforge-version-extras.h" // FONTFORGE_GIT_VERSION #include "fontforge/autowidth.h" // FVRemoveKerns
#include "fontforge/autowidth.h" // FVRemoveKerns #include "fontforge/bitmapchar.h" // SFReplaceEncodingBDFProps
#include "fontforge/bitmapchar.h" // SFReplaceEncodingBDFProps #include "fontforge/cvimages.h" // FVImportImages
#include "fontforge/cvimages.h" // FVImportImages #include "fontforge/encoding.h" // (helpful as we have a name conflict)
#include "fontforge/encoding.h" // (helpful as we have a name conflict) #include "fontforge/fvfonts.h" // SFFindSlot
#include "fontforge/fvfonts.h" // SFFindSlot #include "fontforge/namelist.h" // UniFromName
#include "fontforge/namelist.h" // UniFromName #include "fontforge/savefont.h" // GenerateScript
#include "fontforge/savefont.h" // GenerateScript #include "fontforge/splineorder2.h" // SFConvertToOrder2
#include "fontforge/splineorder2.h" // SFConvertToOrder2 #include "fontforge/splineutil.h" // AltUniFree
#include "fontforge/splineutil.h" // AltUniFree #include "fontforge/splineutil2.h" // SplineFontNew
#include "fontforge/splineutil2.h" // SplineFontNew #include "fontforge/start.h" // InitSimpleStuff
#include "fontforge/start.h" // InitSimpleStuff #include "fontforge/tottf.h" // SFDefaultOS2Info
#include "fontforge/tottf.h" // SFDefaultOS2Info
static real EPS=1e-6; static real EPS=1e-6;
@ -127,9 +126,6 @@ static FFWVersionInfo ffwVersionInfo;
const FFWVersionInfo* ffw_get_version_info(void) const FFWVersionInfo* ffw_get_version_info(void)
{ {
ffwVersionInfo.gitVersion = FONTFORGE_GIT_VERSION;
ffwVersionInfo.majorVersion = xstr(FONTFORGE_VERSION_MAJOR);
ffwVersionInfo.minorVersion = xstr(FONTFORGE_VERSION_MINOR);
ffwVersionInfo.versionDate = FONTFORGE_VERSION; ffwVersionInfo.versionDate = FONTFORGE_VERSION;
return &ffwVersionInfo; return &ffwVersionInfo;
@ -528,7 +524,16 @@ void ffw_import_svg_glyph(int code, const char * filename, double ox, double oy,
memset(cur_fv->selected, 0, cur_fv->map->enccount); memset(cur_fv->selected, 0, cur_fv->map->enccount);
cur_fv->selected[enc] = 1; cur_fv->selected[enc] = 1;
int ok = FVImportImages(cur_fv, (char*)filename, fv_svg, 0, -1); ImportParams ip;
InitImportParams(&ip);
int ok = FVImportImages(
cur_fv,
(char*)filename,
fv_svg,
0 /*toback*/,
true /*preclear*/,
&ip
);
if(!ok) if(!ok)
err("Import SVG glyph failed"); err("Import SVG glyph failed");

View File

@ -25,9 +25,6 @@ void ffw_init(const char* progPath, int debug);
void ffw_finalize(void); void ffw_finalize(void);
typedef struct ffw_version_info { typedef struct ffw_version_info {
const char* gitVersion;
const char* majorVersion;
const char* minorVersion;
const char* versionDate; const char* versionDate;
} FFWVersionInfo ; } FFWVersionInfo ;