~aleteoryx/muditaos

ref: d5f84437cab54acb9fc0b8f96deb6f5d46fed3de muditaos/module-gui/gui/core/FontInfo.hpp -rw-r--r-- 1.4 KiB
d5f84437 — Lefucjusz [MOS-92] Fix continuing music playback after BT disconnection 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <stdint.h>   // for uint16_t, uint32_t, uint8_t
#include <Common.hpp> // for Status
#include <string>     // for string

namespace gui
{
    class FontInfo
    {
      public:
        gui::Status load(uint8_t *data, uint32_t &offset);
        // name of the true type font. max 63 characters
        std::string face;
        // size of the true type font
        uint16_t size;
        // flag that informs if font is bold
        uint16_t bold;
        // flag that informs if font is italic
        uint16_t italic;
        // flag that informs if smoothing was turned on. 1 - smoothing was turned on.
        uint16_t smooth;
        // TODO additional space between characters????
        uint16_t char_spacing;
        // TODO additional space between lines
        uint16_t line_spacing;
        // distance in pixels between each line of text
        uint16_t line_height;
        // number of pixels from the absolute top of the line to the base of the characters
        uint16_t base;
        // width of the texture, normally used to scale the x pos of the character image
        uint16_t scale_w;
        // height of the texture, normally used to scale the y pos of the character image
        uint16_t scale_h;
    };
} // namespace gui