Skip to content

urho3d-tools/font-generator

Repository files navigation

Urho3D Bitmap Font Generator

License: Public Domain

SDF

  1. 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

  2. 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.

  3. Do not use large distance for thin fonts: stroke effect will look bad.

Screenshot

Bitmap Fonts

Bitmap fonts are best used with https://github.com/1vanK/Urho3DSpriteBatch (but not necessarily).

Screenshot

With blurring:

Screenshot Screenshot

Without blurring:

Screenshot

Special case: when the inner and outer colors are identical, the internal character is not rendered.

Screenshot Screenshot

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));

Screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published