mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
working on CID fonts
This commit is contained in:
parent
7ca8760b71
commit
265a7785bc
@ -564,17 +564,15 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const std::string & suf
|
|||||||
|
|
||||||
fontscript_fout << boost::format("Open(\"%1%/%2%%3%\",1)") % TMP_DIR % fn % suffix << endl;
|
fontscript_fout << boost::format("Open(\"%1%/%2%%3%\",1)") % TMP_DIR % fn % suffix << endl;
|
||||||
|
|
||||||
//TODO
|
|
||||||
//for 8bit fonts, always read the UnicodeCMap
|
|
||||||
|
|
||||||
|
|
||||||
auto ctu = font->getToUnicode();
|
auto ctu = font->getToUnicode();
|
||||||
int * code2GID = nullptr;
|
int * code2GID = nullptr;
|
||||||
if(ctu)
|
if(ctu)
|
||||||
{
|
{
|
||||||
|
// TODO: ctu could be CID2Unicode for CID fonts
|
||||||
|
|
||||||
int maxcode = 0;
|
int maxcode = 0;
|
||||||
|
|
||||||
if(font->getType() < fontCIDType0)
|
if(!font->isCIDFont())
|
||||||
{
|
{
|
||||||
maxcode = 0xff;
|
maxcode = 0xff;
|
||||||
//TODO read code2GID for TrueType
|
//TODO read code2GID for TrueType
|
||||||
@ -611,6 +609,7 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, const std::string & suf
|
|||||||
|
|
||||||
ctu->decRefCnt();
|
ctu->decRefCnt();
|
||||||
}
|
}
|
||||||
|
|
||||||
fontscript_fout << boost::format("Generate(\"%1%.ttf\")") % fn << endl;
|
fontscript_fout << boost::format("Generate(\"%1%.ttf\")") % fn << endl;
|
||||||
|
|
||||||
export_remote_font(fn_id, ".ttf", "truetype", font);
|
export_remote_font(fn_id, ".ttf", "truetype", font);
|
||||||
|
Loading…
Reference in New Issue
Block a user