FOnline Engine
Current master GitHub
Documentation Docs/en/reference/font-format/binding.md

Font Binding Contract

Generated reference. Do not edit directly. Update BuildTools/FontFormatInterface.json, then run python BuildTools/docs_font_format.py --write.

Index Formats FOFNT BMFont Binding Layout Rendering Validation Canonical JSON Guide
Stable ID Rule Requirement Why Source
font-format.binding.extension-dispatch Exact extension dispatch Call Game.BindFont with an exact lowercase .fofnt or .fnt path; every other suffix throws a script exception. Dispatch uses case-sensitive ends_with checks and does not sniff descriptor content. Source/Scripting/ClientGlobalScriptMethods.cpp
font-format.binding.raw-copy Descriptor raw-copy boundary Keep fofnt and fnt in Baking.RawCopyFileExtensions so descriptor bytes reach baked resources unchanged. There is no dedicated font descriptor baker; RawCopyBaker preserves path and bytes. Source/Common/Settings.inc, Source/Tools/RawCopyBaker.cpp
font-format.binding.image-resource Separately baked image Ship the referenced image as an independently supported image resource in the same pack and preserve its relative path. The descriptor is raw-copied, but its image is loaded through SpriteManager and the normal image-format pipeline. Source/Client/FontManager.cpp
font-format.binding.font-slots Project-extensible font slots Bind every FontType slot before it is measured or drawn; the Engine names only Default = 0 and embedding scripts may extend the enum through codegen annotations. FontType is an indexed loaded-font table, and unloaded or out-of-range slots throw. Source/Client/FontManager.h
font-format.binding.iface-atlas Interface sprite atlas Script-bound fonts allocate their normal and optional bordered textures in AtlasType::IfaceSprites. Both Game.BindFont descriptor branches pass the same interface atlas type. Source/Scripting/ClientGlobalScriptMethods.cpp
font-format.binding.bind-time-scale Bind-time downscale Pass a finite defaultScale in (0, 1]; use a larger authored bitmap and downscale it rather than requesting runtime upscaling. Binding area-averages glyph pixels and rounds metrics once; values above one and nonpositive or nonfinite values are rejected. Source/Client/FontManager.cpp
font-format.binding.rebind Slot replacement and cache reset Treat a repeated binding of the same slot as replacement; all cached layouts are discarded before the rebuilt font is used. StoreFont replaces the optional table entry, rebuilds atlas data, and clears the format cache. Source/Client/FontManager.cpp
font-format.binding.updater-default Updater fallback font Keep Fonts/Default.fofnt available for the built-in updater path unless the host replaces that resource contract deliberately. Updater binds the Default slot from that exact path with skip-if-loaded behavior. Source/Client/Updater.cpp
Start typing to search.