Font Rollback Problem - Missing Characters

Problem:
There is a problem with Japanese characters when using arial font, they appear just as small rectangle boxes, characters are missing.

Investigation:
The Arial font doesn’t contain any Japanese characters. If a different font such as Mona.ttf then Japanese appears OK. On Windows there is automatic font substitution layer invoked when needed.

Solution:
Our current solution is simple: one fallback font name which is specified by hand. The “font fallback” substitution method SetFallbackFontname() API is added. This allows developers to specify some “fallback” font name when Arial is used which contains Japanese symbols.

void PDF3DExporter::SetUseFontFallback ( bool use_fallback )
bool PDF3DExporter::UseFontFallback()
bool PDF3DExporter::SetFallbackFontFromFile(const char* file)
const char* PDF3DExporter::GetFallbackFontFile()
bool PDF3DExporter::SetFallbackFontFamily(const char* family)
const char* PDF3DExporter::GetFallbackFontFamily()
const char* PDF3DExporter::GetCurrentFontFile()

This method specifies if the font fallback mechanism should used for the text drawing on 2D page.

The font fallback mechanism is used to render symbols belonging to the character sets not supported by the current font. Current implementation of the font fallback is to manually specify the font that supports the desired character sets. The fallback font will the be used to write the unsupported characters with the same font attributes (size, bold, italic …) as the current font.

Note:
Because fallback font is not modified, it’s height, character width and underlining may differ from the current font.

Ticket: #1143: Unicode character not showing in Arial