mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
fix build for latest poppler and fontforge
This commit is contained in:
parent
09dc6547e2
commit
c0371a07a6
@ -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})
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user