# Configure Fallback Font Collections in PHP

> Set up a fallback fonts collection in Aspose.Slides for PHP via Java to keep text consistent and crisp in PowerPoint and OpenDocument presentations.

Source: https://docs.aspose.com/slides/php-java/create-fallback-fonts-collection/
Updated: 2026-08-13


## **Overview**

Aspose.Slides allows you to configure a collection of fallback font rules for a presentation. Each fallback rule is represented by the `FontFallBackRule` class and can be added to a `FontFallBackRulesCollection`.

After creating the collection, you can assign it using the `setFontFallBackRulesCollection` method of the presentation’s `FontsManager`. The `FontsManager` controls fonts across the presentation, and each `Presentation` instance has its own `FontsManager`.

Once the `FontsManager` is initialized with the fallback font collection, the specified fallback fonts are applied during presentation rendering.

## **Apply Fallback Rules**

Instances of [FontFallBackRule](https://reference.aspose.com/slides/php-java/aspose.slides/FontFallBackRule) class can be organized into [FontFallBackRulesCollection](https://reference.aspose.com/slides/php-java/aspose.slides/FontFallBackRulesCollection). It is possible to add or remove rules from the collection.

Then this collection may be assigned to [FontFallBackRulesCollection](https://reference.aspose.com/slides/php-java/aspose.slides/FontFallBackRulesCollection) method of the [FontsManager](https://reference.aspose.com/slides/php-java/aspose.slides/FontsManager) class. FontsManager controls fonts across the presentation.

Each [Presentation](https://reference.aspose.com/slides/php-java/aspose.slides/Presentation) has a [getFontsManager](https://reference.aspose.com/slides/php-java/aspose.slides/Presentation#getFontsManager) method with its own instance of the [FontsManager](https://reference.aspose.com/slides/php-java/aspose.slides/FontsManager) class.

Here is an examples how to create fallback fonts rules collection and assign in into the [FontsManager](https://reference.aspose.com/slides/php-java/aspose.slides/Presentation#getFontsManager) of a certain presentation:  

```php
  $pres = new Presentation();
  try {
    $userRulesList = new FontFallBackRulesCollection();
    $userRulesList->add(new FontFallBackRule(0xb80, 0xbff, "Vijaya"));
    $userRulesList->add(new FontFallBackRule(0x3040, 0x309f, "MS Mincho, MS Gothic"));
    $pres->getFontsManager()->setFontFallBackRulesCollection($userRulesList);
  } finally {
    if (!java_is_null($pres)) {
      $pres->dispose();
    }
  }
```

After FontsManager is initialised with fallback fonts collection, the fallback fonts are applied during presentation rendering.

{{% alert color="info" %}} 
Read more how to [Render Presentation with Fallback Font](/slides/php-java/render-presentation-with-fallback-font/).
{{% /alert %}}

## **FAQ**

### Will my fallback rules be embedded into the PPTX file and visible in PowerPoint after saving?

No. Fallback rules are runtime rendering settings; they are not serialized into PPTX and will not appear in PowerPoint's UI.

### Does fallback apply to text inside SmartArt, WordArt, charts, and tables?

Yes. The same glyph-substitution mechanism is used for any text in these objects.

### Does Aspose distribute any fonts with the library?

No. You add and use fonts on your side and under your own responsibility.

### Can replacement/substitution for missing fonts and fallback for missing glyphs be used together?

Yes. They are independent stages of the same font-resolution pipeline: first the engine resolves font availability ([replacement](/slides/php-java/font-replacement/)/[substitution](/slides/php-java/font-substitution/)), then fallback fills gaps for missing glyphs in available fonts.



## Related articles

- [Render Presentations with Fallback Fonts in PHP](https://docs.aspose.com/slides/php-java/render-presentation-with-fallback-font/)
- [Manage Fallback Fonts for Presentations in PHP](https://docs.aspose.com/slides/php-java/fallback-font/)
- [Specify Fallback Fonts for Presentations in PHP](https://docs.aspose.com/slides/php-java/create-fallback-font/)