mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-05 09:38:40 +00:00
Merge branch 'devv' of github.com:coolwanglu/pdf2htmlEX into devv
This commit is contained in:
commit
6a4c0856a7
|
@ -11,8 +11,9 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "Param.h"
|
#include <GlobalParams.h>
|
||||||
|
|
||||||
|
#include "Param.h"
|
||||||
#include "HTMLRenderer.h"
|
#include "HTMLRenderer.h"
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
@ -109,15 +110,24 @@ void HTMLRenderer::install_base_font(GfxFont * font, GfxFontLoc * font_loc, Font
|
||||||
string psname(font_loc->path->getCString());
|
string psname(font_loc->path->getCString());
|
||||||
string basename = psname.substr(0, psname.find('-'));
|
string basename = psname.substr(0, psname.find('-'));
|
||||||
|
|
||||||
GfxFontLoc * localfontloc = font->locateFont(xref, gFalse);
|
GfxFontLoc * localfontloc = font->locateFont(xref, gTrue);
|
||||||
if(param->embed_base_font)
|
if(param->embed_base_font)
|
||||||
{
|
{
|
||||||
if(localfontloc != nullptr)
|
if(localfontloc != nullptr)
|
||||||
{
|
{
|
||||||
embed_font(string(localfontloc->path->getCString()), font, info);
|
GooString * path = globalParams->findBase14FontFile(localfontloc->path, font);
|
||||||
export_remote_font(info, param->font_suffix, param->font_format, font);
|
if(path)
|
||||||
delete localfontloc;
|
{
|
||||||
return;
|
embed_font(string(path->getCString()), font, info);
|
||||||
|
export_remote_font(info, param->font_suffix, param->font_format, font);
|
||||||
|
delete localfontloc;
|
||||||
|
delete path;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cerr << "Cannot embed base font: f" << hex << info.id << dec << ' ' << psname << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user