Skip to content

Commit

Permalink
Fix issue where some words fonts dont have names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aazhar committed Jun 11, 2018
1 parent 7ffb8a0 commit 04618c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/XmlAltoOutputDev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1893,6 +1893,8 @@ void TextPage::dump(GBool blocks, GBool fullFontName) {
if (verbose) {
addAttributsNodeVerbose(node, tmp, word);
}

GString* gsFontName = new GString();
if (word->getFontName()) {
xmlChar* xcFontName;
// If the font name normalization option is selected
Expand All @@ -1919,15 +1921,13 @@ void TextPage::dump(GBool blocks, GBool fullFontName) {
uncdFontName[i] = (Unicode) xcFontName[i];
}
uncdFontName[size] = (Unicode)0;
GString* gsFontName = new GString();
dumpFragment(uncdFontName, size, uMap, gsFontName);
// xmlNewProp(node, (const xmlChar*)ATTR_FONT_NAME,
// (const xmlChar*)gsFontName->getCString());
fontStyleInfo->setFontName(gsFontName);
//delete gsFontName;


}
// xmlNewProp(node, (const xmlChar*)ATTR_FONT_NAME,
// (const xmlChar*)gsFontName->getCString());
fontStyleInfo->setFontName(gsFontName);
//delete gsFontName;

addAttributsNode(node, word, xMax, yMax, yMinRot, yMaxRot, xMinRot,
xMaxRot, fontStyleInfo);
Expand Down

0 comments on commit 04618c4

Please sign in to comment.