7#include "otype_utilities.hpp"
8#include "../utility/module.hpp"
12namespace hi {
inline namespace v1 {
16 hilet entries = implicit_cast<big_uint16_buf_t>(bytes, bytes.size() /
sizeof(big_uint16_buf_t));
19 hi_check(first <= last,
"'loca' table has invalid entries.");
25 hilet entries = implicit_cast<big_uint32_buf_t>(bytes, bytes.size() /
sizeof(big_uint32_buf_t));
28 hi_check(first <= last,
"'loca' table has invalid entries.");
33otype_loca_get(std::span<std::byte const> loca_bytes, hi::glyph_id glyph_id,
bool loca_is_offset32)
35 if (loca_is_offset32) {
36 return otype_loca32_get(loca_bytes, glyph_id);
38 return otype_loca16_get(loca_bytes, glyph_id);
42[[nodiscard]]
inline std::span<std::byte const> otype_loca_get(
43 std::span<std::byte const> loca_bytes,
44 std::span<std::byte const> glyf_bytes,
45 hi::glyph_id glyph_id,
46 bool loca_is_offset32)
48 hilet[first, last] = otype_loca_get(loca_bytes, glyph_id, loca_is_offset32);
49 hilet size = last - first;
#define hi_check(expression, message,...)
Check if the expression is valid, or throw a parse_error.
Definition assert.hpp:110
#define hi_check_at(span, index)
Get an element from a span, or throw a parse_error.
Definition assert.hpp:176
#define hi_check_subspan(span, offset,...)
Get a subspan, or throw a parse_error.
Definition assert.hpp:151
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11