mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 01:00:37 +00:00
[cmap] Micro-optimize
This commit is contained in:
parent
330c32f902
commit
ae6ea6f4b7
1 changed files with 5 additions and 4 deletions
|
@ -743,10 +743,11 @@ struct CmapSubtableLongSegmented
|
|||
unsigned num_glyphs) const
|
||||
{
|
||||
hb_codepoint_t last_end = 0;
|
||||
for (unsigned i = 0; i < this->groups.len; i++)
|
||||
unsigned count = this->groups.len;
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
{
|
||||
hb_codepoint_t start = this->groups[i].startCharCode;
|
||||
hb_codepoint_t end = hb_min ((hb_codepoint_t) this->groups[i].endCharCode,
|
||||
hb_codepoint_t start = this->groups.arrayZ[i].startCharCode;
|
||||
hb_codepoint_t end = hb_min ((hb_codepoint_t) this->groups.arrayZ[i].endCharCode,
|
||||
(hb_codepoint_t) HB_UNICODE_MAX);
|
||||
if (unlikely (start > end || start < last_end)) {
|
||||
// Range is not in order and is invalid, skip it.
|
||||
|
@ -755,7 +756,7 @@ struct CmapSubtableLongSegmented
|
|||
last_end = end;
|
||||
|
||||
|
||||
hb_codepoint_t gid = this->groups[i].glyphID;
|
||||
hb_codepoint_t gid = this->groups.arrayZ[i].glyphID;
|
||||
if (!gid)
|
||||
{
|
||||
if (T::formatNumber == 13) continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue