HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
font_style.hpp
Go to the documentation of this file.
1// Copyright Take Vos 2023.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
8#pragma once
9
10#include "../utility/module.hpp"
11#include "../generator.hpp"
12
13namespace hi {
14inline namespace v1 {
15
24enum class font_style {
27 normal = 0,
28
31 italic = 1,
32
35 oblique = 1
36};
37
38// clang-format off
39constexpr auto font_style_metadata = enum_metadata{
40 font_style::normal, "normal",
41 font_style::italic, "italic",
42};
43// clang-format on
44
45[[nodiscard]] inline generator<font_style> alternatives(font_style const &start) noexcept
46{
47 if (start == font_style::normal) {
48 co_yield font_style::normal;
49 co_yield font_style::italic;
50 } else {
51 co_yield font_style::italic;
52 co_yield font_style::normal;
53 }
54}
55
56}}
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
font_style
The different styles a font-family comes with.
Definition font_style.hpp:24
@ italic
A font that is italic.
@ oblique
A font that is oblique.
@ normal
A font that is normal, non-italic.