7#include "otype_utilities.hpp"
8#include "../utility/utility.hpp"
9#include "../macros.hpp"
13hi_export_module(hikogui.font.otype_kern);
15hi_export
namespace hi {
inline namespace v1 {
28 big_uint16_buf_t
left;
29 big_uint16_buf_t
right;
30 otype_fword_buf_t value;
53 big_uint16_buf_t version;
58 big_uint16_buf_t version;
59 big_uint16_buf_t length;
60 big_uint16_buf_t coverage;
65 hi_check(*
header.version == 0,
"'kern' table expect version to be version 0.");
72 hi_check(*
entry.version == 0,
"'kern' expect sub-table version to be 0.");
85 hi_check(
not cross_stream,
"'kern' this font contains cross-stream kerning which is unsuported.");
88 hi_check(format == 0,
"'kern' this font contains a unsuported subtable.");
118 big_uint32_buf_t version;
123 big_uint32_buf_t length;
124 big_uint16_buf_t coverage;
125 big_uint16_buf_t tuple_index;
130 hi_check(*
header.version == 0x00010000,
"'kern' table expect version to be version 0x00010000.");
140 hi_check(
entry_length >=
sizeof(entry_type),
"'kern' subtable length is invalid.");
166 hilet
kerning = [&]() -> std::optional<float> {
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
vector2 otype_kern_v0_find(std::span< std::byte const > bytes, glyph_id first_glyph_id, glyph_id second_glyph_id, float em_scale)
'kern' version 0 find.
Definition otype_kern.hpp:50
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
A high-level geometric vector Part of the high-level vector, point, mat and color types.
Definition vector2.hpp:19
constexpr float & x() noexcept
Access the x element from the vector.
Definition vector2.hpp:57