HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Unicode character not displayed, character missing in font › Re: Re: Unicode character not displayed, character missing in font
As a feature request it would be nice if pd4ml would fallback to a own font that contains all symbols instead off printing a questionmark. If i’m not mistaken it’s what the browser are already doing.
The browsers are native application, which have access to all available fonts. Java as a rule has only “proxied” access to the fonts via java.awt.Font object. The object has a lot of useful features, but it does not provide an access to the TTF file itself (we need a physical access to the file tp parse it and partially embed to PDF) – that is why that confusing pd4fonts.properties indexing is needed.
Well – Java can “guess” that the TTFs are in c:/windows/fonts, but there are a lot of fonts there and parsing of all of them to find the one, which has a desired glyph is a resource and time consuming task.
A native application has all the needed info easily available and a font substitution tables are tuned for the platform and available fonts. In Java case we need to come up with a general platform independent solution…
Regarding the original issue: go through the list of available fonts on Win server and check which one contains the glyph – I did so with the standard Character Map application. There are some “glyph-reference” pages in the Internet – probably they refer to popular TTFs, that implement the glyph. After the font is found, explicitly refer it from your HTML/CSS (and make sure it is mapped in pd4fonts.properties). We’ll look for the font also on our side by an opportunity.