Create Fallback Font
Contents
[
Hide
]
Aspose.Slides supports IFontFallBackRule interface and FontFallBackRule class to specify the rules to apply a fallback font. FontFallBackRule class represents an association between the specified Unicode range, used for searching missed glyphs, and a list of fonts that may contain proper glyphs:
long startUnicodeIndex = 0x0B80;
long endUnicodeIndex = 0x0BFF;
IFontFallBackRule firstRule = new FontFallBackRule(startUnicodeIndex, endUnicodeIndex, "Vijaya");
IFontFallBackRule secondRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic");
//Using multiple ways you can add fonts list:
String[] fontNames = new String[] { "Segoe UI Emoji, Segoe UI Symbol", "Arial" };
IFontFallBackRule thirdRule = new FontFallBackRule(0x1F300, 0x1F64F, fontNames);
It is also possible to remove fallback font or addFallBackFonts into existing FontFallBackRule object.
FontFallBackRulesCollection can be used to organize a list of FontFallBackRule objects, when there is a need to specify fallback font replacement rules for multiple Unicode ranges.