License: Public Domain
-
SDF generator uses true brute force on GPU for maximum quality. Currently exists only GLSL shader for it: https://github.com/1vanK/Urho3DBitmapFontGenerator/blob/master/built/AppData/Shaders/GLSL/SdfCalculator.glsl
-
SDF fonts render with large scale and after it downscaled to required size. You can decrease "Scale" parameter to fast generation or increase to improve quality.
-
Do not use large distance for thin fonts: stroke effect will look bad.
Bitmap fonts are best used with https://github.com/1vanK/Urho3DSpriteBatch (but not necessarily).
With blurring:
Without blurring:
Special case: when the inner and outer colors are identical, the internal character is not rendered.
It can be useful to create shadows:
spriteBatch_->DrawString(String("Hello!"), CACHE->GetResource<Font>("Fonts/BigFontShadow.fnt"), 40, Vector2(50.0f + 10.0f, 50.0f + 10.0f), Color(1.0f, 1.0f, 1.0f, 0.5f));
spriteBatch_->DrawString(String("Hello!"), CACHE->GetResource<Font>("Fonts/BigFont.fnt"), 40, Vector2(50.0f, 50.0f));