7#include "otype_utilities.hpp"
8#include "../utility/utility.hpp"
9#include "../i18n/i18n.hpp"
10#include "../macros.hpp"
14hi_export_module(hikogui.font.otype_name);
16hi_export
namespace hi {
inline namespace v1 {
35[[
nodiscard]] hi_inline language_tag otype_name_get_language_unicode(
59 return language_tag{
"en"};
61 return language_tag{};
65[[
nodiscard]] hi_inline language_tag otype_name_get_language_microsoft(
71 return language_tag{
"en-US"};
75 return language_tag{};
79[[
nodiscard]] hi_inline language_tag otype_name_get_language(
107[[
nodiscard]] hi_inline std::optional<std::string>
111 big_uint16_buf_t format;
112 big_uint16_buf_t count;
121 big_uint16_buf_t platform_id;
122 big_uint16_buf_t platform_specific_id;
123 big_uint16_buf_t language_id;
124 big_uint16_buf_t name_id;
125 big_uint16_buf_t length;
126 big_uint16_buf_t offset;
132 auto const format = *
header.format;
133 hi_check(format == 0
or format == 1,
"'name' table must be format 0 or format 1.");
172[[
nodiscard]] hi_inline
auto otype_name_get_family(std::span<std::byte const>
bytes)
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
constexpr bool matches(phrasing_mask const &lhs, phrasing const &rhs) noexcept
Check if the text-phrasing is included in the text-phrasing-mask.
Definition phrasing.hpp:230
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
hi_inline std::optional< std::string > otype_name_search(std::span< std::byte const > bytes, uint16_t name_id, language_tag language=language_tag{"en"})
Get a name from the name table.
Definition otype_name.hpp:108
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
Definition otype_name.hpp:19
The IETF BCP 47 language tag.
Definition language_tag_intf.hpp:30