Create Fallback Font

Contents
[ ]

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:

  $startUnicodeIndex = 0xb80;
  $endUnicodeIndex = 0xbff;
  $firstRule = new FontFallBackRule($startUnicodeIndex, $endUnicodeIndex, "Vijaya");
  $secondRule = new FontFallBackRule(0x3040, 0x309f, "MS Mincho, MS Gothic");
  # Using multiple ways you can add fonts list:
  $fontNames = array("Segoe UI Emoji, Segoe UI Symbol", "Arial" );
  $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.