[instance] update OS2/.usWeightClass and .usWidthClass when
no-prune-unicode-ranges option is enabled
This commit is contained in:
parent
fddeba26e4
commit
8a5524833c
|
@ -212,17 +212,6 @@ struct OS2
|
||||||
TRACE_SUBSET (this);
|
TRACE_SUBSET (this);
|
||||||
OS2 *os2_prime = c->serializer->embed (this);
|
OS2 *os2_prime = c->serializer->embed (this);
|
||||||
if (unlikely (!os2_prime)) return_trace (false);
|
if (unlikely (!os2_prime)) return_trace (false);
|
||||||
if (c->plan->flags & HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES)
|
|
||||||
return_trace (true);
|
|
||||||
|
|
||||||
/* when --gids option is not used, no need to do collect_mapping that is
|
|
||||||
* iterating all codepoints in each subtable, which is not efficient */
|
|
||||||
uint16_t min_cp, max_cp;
|
|
||||||
find_min_and_max_codepoint (c->plan->unicodes, &min_cp, &max_cp);
|
|
||||||
os2_prime->usFirstCharIndex = min_cp;
|
|
||||||
os2_prime->usLastCharIndex = max_cp;
|
|
||||||
|
|
||||||
_update_unicode_ranges (c->plan->unicodes, os2_prime->ulUnicodeRange);
|
|
||||||
|
|
||||||
if (c->plan->user_axes_location->has (HB_TAG ('w','g','h','t')) &&
|
if (c->plan->user_axes_location->has (HB_TAG ('w','g','h','t')) &&
|
||||||
!c->plan->pinned_at_default)
|
!c->plan->pinned_at_default)
|
||||||
|
@ -244,6 +233,18 @@ struct OS2
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c->plan->flags & HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES)
|
||||||
|
return_trace (true);
|
||||||
|
|
||||||
|
/* when --gids option is not used, no need to do collect_mapping that is
|
||||||
|
* iterating all codepoints in each subtable, which is not efficient */
|
||||||
|
uint16_t min_cp, max_cp;
|
||||||
|
find_min_and_max_codepoint (c->plan->unicodes, &min_cp, &max_cp);
|
||||||
|
os2_prime->usFirstCharIndex = min_cp;
|
||||||
|
os2_prime->usLastCharIndex = max_cp;
|
||||||
|
|
||||||
|
_update_unicode_ranges (c->plan->unicodes, os2_prime->ulUnicodeRange);
|
||||||
|
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -3,6 +3,7 @@ Roboto-Variable.ttf
|
||||||
|
|
||||||
PROFILES:
|
PROFILES:
|
||||||
default.txt
|
default.txt
|
||||||
|
no-prune-unicode-ranges.txt
|
||||||
|
|
||||||
SUBSETS:
|
SUBSETS:
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue