33 static const QPainterPath s_path0 = []() {
36 p.addRect(0, 0, 3, 5);
45 static const QPainterPath s_path1 = []() {
47 p.addRect(1, 0, 1, 5);
55 static const QPainterPath s_path2 = []() {
79 static const QPainterPath s_path3 = []() {
103 static const QPainterPath s_path4 = []() {
125 static const QPainterPath s_path5 = []() {
128 return QTransform::fromScale(-1, 1).map(
p).toReversed().translated(3, 0);
135 static const QPainterPath s_path6 = []() {
156 static const QPainterPath s_path7 = []() {
174 static const QPainterPath s_path8 = []() {
176 p.addRect(0, 0, 3, 5);
186 static const QPainterPath s_path9 = []() {
189 return QTransform::fromScale(-1, -1).map(
p).translated(3, 5);
196 static const QPainterPath s_pathA = []() {
217 static const QPainterPath s_pathB = []() {
243 static const QPainterPath s_pathC = []() {
263 static const QPainterPath s_pathD = []() {
285 static const QPainterPath s_pathE = []() {
309 static const QPainterPath s_pathF = []() {
374 glyph.translate(2 + col * 4, 2 + row * 6);
385static constexpr unsigned valueAt(
const char32_t codepoint,
const unsigned place)
387 return (codepoint >> (place * 4)) & 0xF;
395 const int inner = width - 1;
396 const QPolygon a{
QVector<QPoint>{{0, 0}, {width, 0}, {width, 15}, {0, 15}}};
397 const QPolygon b{
QVector<QPoint>{{1, 1}, {1, 14}, {inner, 14}, {inner, 1}}};
404QPainterPath
create(
const char32_t codepoint,
double height)
408 if (codepoint > 0xFFFF) {
414 static const QPainterPath s_outline15 =
makeFrame(15);
415 p.addPath(s_outline15);
427 static const QPainterPath s_outline11 =
makeFrame(11);
428 p.addPath(s_outline11);
434 const auto scale = (1. / 15.) * height;
435 return QTransform::fromScale(scale, scale).map(
p);
float value(const T *src, size_t ch)
static QPainterPath hexChar9()
static QPainterPath hexChar7()
static QPainterPath hexCharB()
static QPolygon lowerHole()
static QPainterPath hexCharC()
static QPainterPath getHexChar(unsigned value)
static QPainterPath hexChar3()
QPainterPath create(const char32_t codepoint, double height)
Creates a tofu missing glyph indicator representing the provided Unicode codepoint.
static QPainterPath hexChar8()
static QPainterPath hexChar0()
static QPainterPath hexCharF()
static QPainterPath hexChar1()
static QPolygon upperHole()
static QPainterPath hexChar2()
static QPainterPath hexChar6()
static QPainterPath makeFrame(const int width)
Creates the frame of a tofu glyph.
static QPainterPath hexCharA()
static QPainterPath hexChar5()
static constexpr unsigned valueAt(const char32_t codepoint, const unsigned place)
Gets the hex digit at a place.
static void addHexChar(QPainterPath &p, unsigned value, int row, int col)
Adds a hex char at the specified row/column to the QPainterPath.
static QPainterPath hexCharE()
static QPainterPath hexChar4()
static QPainterPath hexCharD()