How to to extract fonts in FineReader Engine

Here is a C++ code snippet which can be used to extract fonts:

for(int k = 0; k < paragraphs.getCount(); k++) {
IParagraph paragraph = paragraphs.getElement(k);
IFontStyle baseFont = paragraph.getParagraphStyle().getBaseFont();
System.out.println("Font Name: " + baseFont.getFontName());
System.out.println("Font Type: " + baseFont.getFontType().name());
System.out.println("Font Size: " + baseFont.getFontSize());
System.out.println("Text: " + paragraph.getText());
}

In order for Engine to detect fonts properly, make sure that the related fonts are installed in your system.
If the fonts are already installed/registered in your system but Engine still can't detect them correctly, then you will need to specify the path to the fonts folder using the  CustomFontSet::setFolder("path to your fonts folder") property.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed