1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

fix build for latest poppler and fontforge

This commit is contained in:
Lu Wang 2014-02-08 20:35:33 +08:00
parent 09dc6547e2
commit c0371a07a6
3 changed files with 18 additions and 5 deletions

View File

@ -17,13 +17,23 @@ add_custom_target(dist
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
find_package(PkgConfig)
pkg_check_modules(POPPLER poppler>=0.23.0)
pkg_check_modules(POPPLER poppler>=0.25.0)
if(POPPLER_FOUND)
set(POPPLER_OLDER_THAN_0_25_0 0)
set(POPPLER_OLDER_THAN_0_23_0 0)
else()
set(POPPLER_OLDER_THAN_0_23_0 1)
pkg_check_modules(POPPLER REQUIRED poppler>=0.20.0)
set(POPPLER_OLDER_THAN_0_25_0 1)
pkg_check_modules(POPPLER poppler>=0.23.0)
if(POPPLER_FOUND)
set(POPPLER_OLDER_THAN_0_23_0 0)
else()
set(POPPLER_OLDER_THAN_0_23_0 1)
pkg_check_modules(POPPLER REQUIRED poppler>=0.20.0)
endif()
endif()
include_directories(${POPPLER_INCLUDE_DIRS})
link_directories(${POPPLER_LIBRARY_DIRS})
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${POPPLER_LIBRARIES})

View File

@ -202,7 +202,7 @@ static void ffw_do_reencode(Encoding * encoding, int force)
SFReplaceEncodingBDFProps(cur_fv->sf, cur_fv->map);
free(cur_fv->selected);
cur_fv->selected = gcalloc(cur_fv->map->enccount, sizeof(char));
cur_fv->selected = calloc(cur_fv->map->enccount, sizeof(char));
}
void ffw_reencode_glyph_order(void)

View File

@ -118,8 +118,11 @@ Unicode unicode_from_font (CharCode code, GfxFont * font)
// may be untranslated ligature
if(cname)
{
#if POPPLER_OLDER_THAN_0_25_0
Unicode ou = globalParams->mapNameToUnicode(cname);
#else
Unicode ou = globalParams->mapNameToUnicodeText(cname);
#endif
if(isLegalUnicode(ou))
return ou;
}