mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 00:41:09 +01:00
[subset/cff1] Speed up plan_subset_charset
This commit is contained in:
1 parent
7305ec47b1
commit
b4b80bcaea
1 file changed
+7
-1
@@ -556,7 +556,13 @@ struct cff1_subset_plan
|
||||
if (sid != last_sid + 1)
|
||||
{
|
||||
code_pair_t pair { sid, glyph };
|
||||
subset_charset_ranges.push (pair);
|
||||
// This is stupid to do manually but it does show speedup.
|
||||
// We should find up where the slowdown comes from in push()
|
||||
// and fix it.
|
||||
if ((int) subset_charset_ranges.length < subset_charset_ranges.allocated)
|
||||
subset_charset_ranges.arrayZ[subset_charset_ranges.length++] = pair;
|
||||
else
|
||||
subset_charset_ranges.push (pair);
|
||||
}
|
||||
last_sid = sid;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user