Files
product-vamp/include/vamp_style/font.hpp
T
khodowany fe42d811fa
ci / checks (push) Successful in 42m54s
Formatting
2026-09-15 00:06:02 -05:00

29 lines
943 B
C++

#pragma once
#include <array>
#include <cstdint>
#include <string_view>
#include <modulus/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;
}