|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Classes | |
| struct | Glyph |
| class | BitmapFont |
Functions | |
| static std::string | extractValue (const std::string &line, const std::string &key) |
| static i32 | extractInt (const std::string &line, const std::string &key) |
| void | sdfFromAlpha (const u8 *alpha, u8 *out, u32 width, u32 height, f32 spread) |
| Signed distance field from an antialiased alpha coverage bitmap. | |
| constexpr u32 | nextCodepoint (const char *data, usize length, usize &pos) |
Variables | |
| constexpr u32 | kReplacementCodepoint = 0xFFFD |
|
static |
Definition at line 36 of file BitmapFont.cpp.
References extractValue().
|
static |
Definition at line 12 of file BitmapFont.cpp.
Referenced by extractInt().
Definition at line 11 of file Utf8.hpp.
References kReplacementCodepoint.
Referenced by esengine::text::BitmapFont::createLabelAtlas(), and esengine::text::BitmapFont::measureText().
Signed distance field from an antialiased alpha coverage bitmap.
Exact Felzenszwalb–Huttenlocher squared-distance transform with coverage-derived fractional seeds: partially covered texels place the edge at sub-texel accuracy, so magnified glyphs keep smooth edges instead of the source rasterization's pixel staircase.
| alpha | width*height coverage bytes (antialiased coverage is used, not thresholded). |
| out | width*height output bytes. 128 encodes the edge; values above 128 are inside, below are outside. The mapping is linear with spread pixels spanning half the [0,255] range, matching what the SDF text shader expects. |
| spread | distance in pixels mapped to half the byte range (the SDF "range"/padding). Larger = softer falloff / more outline room. |
Definition at line 102 of file SdfGenerator.cpp.
|
inlineconstexpr |
Definition at line 9 of file Utf8.hpp.
Referenced by nextCodepoint().