19 std::span<std::byte const> file_bytes;
21 uint16_t OS2_xHeight = 0;
22 uint16_t OS2_HHeight = 0;
25 std::span<std::byte const> cmapTableBytes;
28 std::span<std::byte const> cmapBytes;
31 std::span<std::byte const> glyfTableBytes;
34 std::span<std::byte const> headTableBytes;
37 bool locaTableIsOffset32;
40 std::span<std::byte const> hheaTableBytes;
44 uint16_t numberOfHMetrics;
47 std::span<std::byte const> hmtxTableBytes;
50 std::span<std::byte const> locaTableBytes;
53 std::span<std::byte const> maxpTableBytes;
57 std::span<std::byte const> nameTableBytes;
60 std::span<std::byte const> postTableBytes;
63 std::span<std::byte const> os2TableBytes;
66 std::span<std::byte const> kernTableBytes;
83 file_bytes = this->view->bytes();
87 true_type_font(URL
const &url) :
90 file_bytes = this->view->bytes();
95 throw parse_error(
"{}: Could not parse font directory.\n{}", url, e.
what());
104 ~true_type_font() =
default;
129 const noexcept override;
136 void parsefontDirectory();
141 void parseHeadTable(std::span<std::byte const> headTableBytes);
143 void parseHheaTable(std::span<std::byte const> bytes);
145 void parseNameTable(std::span<std::byte const> bytes);
147 void parseOS2Table(std::span<std::byte const> bytes);
157 void parseMaxpTable(std::span<std::byte const> bytes);
167 bool updateglyph_metrics(
173 bool loadSimpleGlyph(std::span<std::byte const> bytes, graphic_path &glyph)
const noexcept;
183 bool loadCompoundGlyph(std::span<std::byte const> bytes, graphic_path &glyph,
tt::glyph_id &metrics_glyph_id)
const noexcept;
192 bool loadCompoundglyph_metrics(std::span<std::byte const> bytes,
tt::glyph_id &metrics_glyph_id)
const noexcept;
bool loadglyph_metrics(tt::glyph_id glyph_id, glyph_metrics &metrics, tt::glyph_id lookahead_glyph_id=tt::glyph_id{}) const noexcept override
Load a glyphMetrics into a path.