|
Krita Source Code Documentation
|
Tasty tofu for Kiki. More...
Functions | |
| static void | addHexChar (QPainterPath &p, unsigned value, int row, int col) |
| Adds a hex char at the specified row/column to the QPainterPath. | |
| QPainterPath | create (char32_t codepoint, double height) |
| Creates a tofu missing glyph indicator representing the provided Unicode codepoint. | |
| static QPainterPath | getHexChar (unsigned value) |
| static QPainterPath | hexChar0 () |
| static QPainterPath | hexChar1 () |
| static QPainterPath | hexChar2 () |
| static QPainterPath | hexChar3 () |
| static QPainterPath | hexChar4 () |
| static QPainterPath | hexChar5 () |
| static QPainterPath | hexChar6 () |
| static QPainterPath | hexChar7 () |
| static QPainterPath | hexChar8 () |
| static QPainterPath | hexChar9 () |
| static QPainterPath | hexCharA () |
| static QPainterPath | hexCharB () |
| static QPainterPath | hexCharC () |
| static QPainterPath | hexCharD () |
| static QPainterPath | hexCharE () |
| static QPainterPath | hexCharF () |
| static QPolygon | lowerHole () |
| static QPainterPath | makeFrame (const int width) |
| Creates the frame of a tofu glyph. | |
| static QPolygon | upperHole () |
| static constexpr unsigned | valueAt (const char32_t codepoint, const unsigned place) |
| Gets the hex digit at a place. | |
Tasty tofu for Kiki.
Whenever we try to render a piece of text and it contains Unicode codepoints that have no suitable glyphs in any of the matched fonts, a default glyph, typically a small rectangle that resembles a block of "tofu" is rendered in its place.
Some applications (Firefox for example) take it further and, instead of showing a hollow rectangle, actually print the hex representation of the Unicode codepoint inside the rectangle, as a missing glyph indicator. KisTofuGlyph does exactly this for Krita.
|
static |
Adds a hex char at the specified row/column to the QPainterPath.
Definition at line 371 of file KisTofuGlyph.cpp.
References getHexChar(), p, and value().
| QPainterPath KisTofuGlyph::create | ( | char32_t | codepoint, |
| double | height ) |
Creates a tofu missing glyph indicator representing the provided Unicode codepoint.
| codepoint | Unicode codepoint to display |
Definition at line 404 of file KisTofuGlyph.cpp.
References addHexChar(), makeFrame(), p, and valueAt().
|
static |
Definition at line 329 of file KisTofuGlyph.cpp.
References hexChar0(), hexChar1(), hexChar2(), hexChar3(), hexChar4(), hexChar5(), hexChar6(), hexChar7(), hexChar8(), hexChar9(), hexCharA(), hexCharB(), hexCharC(), hexCharD(), hexCharE(), hexCharF(), and value().
|
inlinestatic |
Definition at line 31 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
|
inlinestatic |
Definition at line 53 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 77 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 101 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 123 of file KisTofuGlyph.cpp.
References hexChar2(), and p.
|
inlinestatic |
Definition at line 133 of file KisTofuGlyph.cpp.
References lowerHole(), and p.
|
inlinestatic |
Definition at line 154 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 172 of file KisTofuGlyph.cpp.
References lowerHole(), p, and upperHole().
|
inlinestatic |
Definition at line 184 of file KisTofuGlyph.cpp.
References hexChar6(), and p.
|
inlinestatic |
Definition at line 194 of file KisTofuGlyph.cpp.
References p, and upperHole().
|
inlinestatic |
Definition at line 215 of file KisTofuGlyph.cpp.
References lowerHole(), p, and upperHole().
|
inlinestatic |
Definition at line 241 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 261 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 283 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 307 of file KisTofuGlyph.cpp.
References p.
|
inlinestatic |
Definition at line 26 of file KisTofuGlyph.cpp.
|
inlinestatic |
|
inlinestatic |
Definition at line 21 of file KisTofuGlyph.cpp.
|
staticconstexpr |
Gets the hex digit at a place.
| codepoint | |
| place | 0-base digit index |
Definition at line 385 of file KisTofuGlyph.cpp.