When substituting fonts, there is one important questions we need to solve…
What happens if we do not recognise the font?
There are 3 alternatives we have for handling fonts we do not have setup for substitution:-
a. Ignore the fact and use the font name. (HTMLFontMapper.IGNORE)
b. Use a default. (HTMLFontMapper.DEFAULT_ON_UNMAPPED)
c. Fail (forcing the user to fix the issue by setting up a mapping (HTMLFontMapper.FAIL_ON_UNMAPPED)
It is set by a single call when we setup HTML extraction
If you look at the code you will also see THREE currently unused options (EMBED_UNKNOWN_AS_IMAGE, EMBED_UNKNOWN_WITH_FONT, EMBED_ALL) which might whet your appetite for some possible future enhancements…
Click here to see all the articles in the PDF to HTML5 conversion series.
This post is part of our “Fonts Articles Index” in these articles we explore Fonts.
Latest posts by Mark Stephens (see all)
- How we are improving our code quality with IDEA in 2018 - March 7, 2018
- How we are improving our code quality with NetBeans in 2018 - March 1, 2018
- 3 ways that the European Union is changing the way Companies write software in 2018 - January 31, 2018
- IDRsolutions product range update for 2018 - January 22, 2018
- 4 ways Companies can make remote working successful - December 21, 2017