@@ -30,7 +30,7 @@ using common::SparseBitSet;
30
30
namespace ift ::proto {
31
31
32
32
constexpr uint8_t features_and_design_space_bit_mask = 1 ;
33
- constexpr uint8_t copy_indices_bit_mask = 1 << 1 ;
33
+ constexpr uint8_t child_indices_bit_mask = 1 << 1 ;
34
34
constexpr uint8_t index_delta_bit_mask = 1 << 2 ;
35
35
constexpr uint8_t encoding_bit_mask = 1 << 3 ;
36
36
constexpr uint8_t codepoint_bit_mask = 0b11 << 4 ;
@@ -246,7 +246,7 @@ Status EncodeEntry(const PatchMap::Entry& entry, uint32_t last_entry_index,
246
246
bool has_codepoints = !coverage.codepoints .empty ();
247
247
bool has_features = !coverage.features .empty ();
248
248
bool has_design_space = !coverage.design_space .empty ();
249
- bool has_copy_indices = !coverage.copy_indices .empty ();
249
+ bool has_child_indices = !coverage.child_indices .empty ();
250
250
bool has_features_or_design_space = has_features || has_design_space;
251
251
int64_t delta =
252
252
((int64_t )entry.patch_index ) - ((int64_t )last_entry_index + 1 );
@@ -258,10 +258,10 @@ Status EncodeEntry(const PatchMap::Entry& entry, uint32_t last_entry_index,
258
258
// format
259
259
uint8_t format =
260
260
(has_features_or_design_space ? features_and_design_space_bit_mask
261
- : 0 ) | // bit 0
262
- (has_copy_indices ? copy_indices_bit_mask : 0 ) | // bit 1
263
- (has_delta ? index_delta_bit_mask : 0 ) | // bit 2
264
- (has_patch_encoding ? encoding_bit_mask : 0 ) | // bit 3
261
+ : 0 ) | // bit 0
262
+ (has_child_indices ? child_indices_bit_mask : 0 ) | // bit 1
263
+ (has_delta ? index_delta_bit_mask : 0 ) | // bit 2
264
+ (has_patch_encoding ? encoding_bit_mask : 0 ) | // bit 3
265
265
(has_codepoints ? codepoint_bit_mask & BiasFormat (bias_bytes)
266
266
: 0 ) | // bit 4 and 5
267
267
(entry.ignored ? ignore_bit_mask : 0 ); // bit 6
@@ -285,20 +285,20 @@ Status EncodeEntry(const PatchMap::Entry& entry, uint32_t last_entry_index,
285
285
}
286
286
}
287
287
288
- if (has_copy_indices ) {
289
- if (entry.coverage .copy_indices .size () >
288
+ if (has_child_indices ) {
289
+ if (entry.coverage .child_indices .size () >
290
290
0b01111111 ) { // 7 bits are used to store the count.
291
291
return absl::InvalidArgumentError (
292
- StrCat (" Maximum number of copy indices exceeded: " ,
293
- entry.coverage .copy_indices .size (), " > 127." ));
292
+ StrCat (" Maximum number of child indices exceeded: " ,
293
+ entry.coverage .child_indices .size (), " > 127." ));
294
294
}
295
- uint8_t count = (uint8_t )entry.coverage .copy_indices .size ();
296
- if (entry.coverage .copy_mode_append ) {
295
+ uint8_t count = (uint8_t )entry.coverage .child_indices .size ();
296
+ if (entry.coverage .conjunctive ) {
297
297
// MSB is used to record the append mode bit.
298
298
count |= 0b10000000 ;
299
299
}
300
300
FontHelper::WriteUInt8 (count, out);
301
- for (uint32_t index : entry.coverage .copy_indices ) {
301
+ for (uint32_t index : entry.coverage .child_indices ) {
302
302
WRITE_UINT24 (index, out, " Exceeded max copy index size." );
303
303
}
304
304
}
0 commit comments