Lines Matching refs:ots

5 #include "ots.h"
86 bool (*parse)(ots::OpenTypeFile *otf, const uint8_t *data, size_t length);
87 bool (*serialise)(ots::OTSStream *out, ots::OpenTypeFile *file);
88 bool (*should_serialise)(ots::OpenTypeFile *file);
89 void (*free)(ots::OpenTypeFile *file);
92 { "maxp", ots::ots_maxp_parse, ots::ots_maxp_serialise,
93 ots::ots_maxp_should_serialise, ots::ots_maxp_free, true },
94 { "head", ots::ots_head_parse, ots::ots_head_serialise,
95 ots::ots_head_should_serialise, ots::ots_head_free, true },
96 { "OS/2", ots::ots_os2_parse, ots::ots_os2_serialise,
97 ots::ots_os2_should_serialise, ots::ots_os2_free, true },
98 { "cmap", ots::ots_cmap_parse, ots::ots_cmap_serialise,
99 ots::ots_cmap_should_serialise, ots::ots_cmap_free, true },
100 { "hhea", ots::ots_hhea_parse, ots::ots_hhea_serialise,
101 ots::ots_hhea_should_serialise, ots::ots_hhea_free, true },
102 { "hmtx", ots::ots_hmtx_parse, ots::ots_hmtx_serialise,
103 ots::ots_hmtx_should_serialise, ots::ots_hmtx_free, true },
104 { "name", ots::ots_name_parse, ots::ots_name_serialise,
105 ots::ots_name_should_serialise, ots::ots_name_free, true },
106 { "post", ots::ots_post_parse, ots::ots_post_serialise,
107 ots::ots_post_should_serialise, ots::ots_post_free, true },
108 { "loca", ots::ots_loca_parse, ots::ots_loca_serialise,
109 ots::ots_loca_should_serialise, ots::ots_loca_free, false },
110 { "glyf", ots::ots_glyf_parse, ots::ots_glyf_serialise,
111 ots::ots_glyf_should_serialise, ots::ots_glyf_free, false },
112 { "CFF ", ots::ots_cff_parse, ots::ots_cff_serialise,
113 ots::ots_cff_should_serialise, ots::ots_cff_free, false },
114 { "VDMX", ots::ots_vdmx_parse, ots::ots_vdmx_serialise,
115 ots::ots_vdmx_should_serialise, ots::ots_vdmx_free, false },
116 { "hdmx", ots::ots_hdmx_parse, ots::ots_hdmx_serialise,
117 ots::ots_hdmx_should_serialise, ots::ots_hdmx_free, false },
118 { "gasp", ots::ots_gasp_parse, ots::ots_gasp_serialise,
119 ots::ots_gasp_should_serialise, ots::ots_gasp_free, false },
120 { "cvt ", ots::ots_cvt_parse, ots::ots_cvt_serialise,
121 ots::ots_cvt_should_serialise, ots::ots_cvt_free, false },
122 { "fpgm", ots::ots_fpgm_parse, ots::ots_fpgm_serialise,
123 ots::ots_fpgm_should_serialise, ots::ots_fpgm_free, false },
124 { "prep", ots::ots_prep_parse, ots::ots_prep_serialise,
125 ots::ots_prep_should_serialise, ots::ots_prep_free, false },
126 { "LTSH", ots::ots_ltsh_parse, ots::ots_ltsh_serialise,
127 ots::ots_ltsh_should_serialise, ots::ots_ltsh_free, false },
128 { "VORG", ots::ots_vorg_parse, ots::ots_vorg_serialise,
129 ots::ots_vorg_should_serialise, ots::ots_vorg_free, false },
130 { "kern", ots::ots_kern_parse, ots::ots_kern_serialise,
131 ots::ots_kern_should_serialise, ots::ots_kern_free, false },
134 { "GDEF", ots::ots_gdef_parse, ots::ots_gdef_serialise,
135 ots::ots_gdef_should_serialise, ots::ots_gdef_free, false },
136 { "GPOS", ots::ots_gpos_parse, ots::ots_gpos_serialise,
137 ots::ots_gpos_should_serialise, ots::ots_gpos_free, false },
138 { "GSUB", ots::ots_gsub_parse, ots::ots_gsub_serialise,
139 ots::ots_gsub_should_serialise, ots::ots_gsub_free, false },
140 { "vhea", ots::ots_vhea_parse, ots::ots_vhea_serialise,
141 ots::ots_vhea_should_serialise, ots::ots_vhea_free, false },
142 { "vmtx", ots::ots_vmtx_parse, ots::ots_vmtx_serialise,
143 ots::ots_vmtx_should_serialise, ots::ots_vmtx_free, false },
144 { "MATH", ots::ots_math_parse, ots::ots_math_serialise,
145 ots::ots_math_should_serialise, ots::ots_math_free, false },
146 { "CBDT", ots::ots_cbdt_parse, ots::ots_cbdt_serialise,
147 ots::ots_cbdt_should_serialise, ots::ots_cbdt_free, false },
148 { "CBLC", ots::ots_cblc_parse, ots::ots_cblc_serialise,
149 ots::ots_cblc_should_serialise, ots::ots_cblc_free, false },
154 bool ProcessGeneric(ots::OpenTypeFile *header,
156 ots::OTSStream *output,
159 ots::Buffer& file);
161 bool ProcessTTF(ots::OpenTypeFile *header,
162 ots::OTSStream *output, const uint8_t *data, size_t length) {
163 ots::Buffer file(data, length);
173 if (!ots::IsValidVersionTag(header->version)) {
238 bool ProcessWOFF(ots::OpenTypeFile *header,
239 ots::OTSStream *output, const uint8_t *data, size_t length) {
240 ots::Buffer file(data, length);
259 if (!ots::IsValidVersionTag(header->version)) {
337 total_sfnt_size += ots::Round4(table.uncompressed_length);
353 if (tables[first_index].offset != ots::Round4(file.offset())) {
363 uint64_t block_end = ots::Round4(
373 block_end = ots::Round4(static_cast<uint64_t>(meta_offset) +
383 block_end = ots::Round4(static_cast<uint64_t>(priv_offset) +
389 if (block_end != ots::Round4(length)) {
396 bool ProcessWOFF2(ots::OpenTypeFile *header,
397 ots::OTSStream *output, const uint8_t *data, size_t length) {
398 size_t decompressed_size = ots::ComputeWOFF2FinalSize(data, length);
408 if (!ots::ConvertWOFF2ToTTF(&decompressed_buffer[0], decompressed_size,
415 bool ProcessGeneric(ots::OpenTypeFile *header, uint32_t signature,
416 ots::OTSStream *output,
419 ots::Buffer& file) {
480 end_byte = ots::Round4(end_byte);
689 namespace ots {
760 } // namespace ots