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/utility.hpp"
11#include <string_view>
12#include <coroutine>
13
14hi_export_module(hikogui.font.font_style);
15
16hi_export namespace hi {
17inline namespace v1 {
18
27hi_export enum class font_style {
30 normal = 0,
31
34 italic = 1,
35
38 oblique = 1
39};
40
41// clang-format off
42constexpr auto font_style_metadata = enum_metadata{
43 font_style::normal, "normal",
44 font_style::italic, "italic",
45};
46// clang-format on
47
48hi_export [[nodiscard]] inline generator<font_style> alternatives(font_style start) noexcept
49{
50 if (start == font_style::normal) {
51 co_yield font_style::normal;
52 co_yield font_style::italic;
53 } else {
54 co_yield font_style::italic;
55 co_yield font_style::normal;
56 }
57}
58
59}}
The HikoGUI namespace.
Definition array_generic.hpp:20
font_style
The different styles a font-family comes with.
Definition font_style.hpp:27
@ italic
A font that is italic.
@ oblique
A font that is oblique.
@ normal
A font that is normal, non-italic.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20