Reference provider

The reference provider is a special type of provider, and is not treated the same as other types of provider. Reference providers point to another font JSON, and thus load any providers present in that targeted JSON.

The value of its type field is "reference". It has no priority.

Reference providers do not have any implementation and are immediately "followed" to their target. The target providers are added as if they appeared in place of the reference provider itself.

Note

It is not possible to define a custom implementation for the reference provider.

Important

Reference providers are not allowed to target themselves, either directly or indirectly (circularly).

Warning

Saving a font that originally contained reference providers will not save those reference providers. Reference providers are not stored, and are simply used as signals to load providers from somewhere else.

Instead, the referenced providers will be saved in place of the reference provider.

Bug

In game, reference providers will "guarantee [providers] to be loaded only once, no matter how many times they are included." In mcfonts, this mechanic is not (yet) included.

Thus, if multiple reference providers target the same file, the providers loaded may be duplicated. The behavior of duplicated providers has not been extensively tested, but should be generally safe, albeit slower.

Structure

{
    "type": "reference",
    "id": resource location
}
id

Resource location to font JSON to load providers from.

Unwinding

Unwinding is the internal process of taking a reference provider and loading the providers it targets. The result is the collection of referenced providers.

API

This provider is not represented in the API.