28 lines
934 B
C++
28 lines
934 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <string_view>
|
|
|
|
#include <types.hpp>
|
|
|
|
namespace vamp_style {
|
|
|
|
constexpr auto ui_font_path = std::string_view{"/usr/share/product-vamp/fonts/petaluma/PetalumaScript.otf"};
|
|
constexpr auto score_text_font_path = std::string_view{"/usr/share/product-vamp/fonts/petaluma/PetalumaScript.otf"};
|
|
constexpr auto score_music_font_path = std::string_view{"/usr/share/product-vamp/fonts/petaluma/Petaluma.otf"};
|
|
constexpr auto ui_font_height = std::int32_t{36};
|
|
constexpr auto ui_font_max_width = std::int32_t{28};
|
|
|
|
struct font_glyph {
|
|
std::array<std::uint8_t, ui_font_height * ui_font_max_width> alpha{};
|
|
std::uint8_t width{};
|
|
std::uint8_t advance{};
|
|
};
|
|
|
|
auto ui_font_glyph(std::char_t value) -> vamp_style::font_glyph;
|
|
auto ui_font_pair_adjust(std::char_t left, std::char_t right) -> std::int32_t;
|
|
auto ui_text_width(std::string_view text, std::int32_t scale) -> std::int32_t;
|
|
|
|
}
|