mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
[subset/cff1] Reuse a function
This commit is contained in:
1 parent
ffd23d3a31
commit
bd3e78770e
1 file changed
+2
-2
@@ -529,7 +529,7 @@ struct Charset
|
||||
|
||||
case 1:
|
||||
{
|
||||
Charset1 *fmt1 = c->allocate_size<Charset1> (Charset1::min_size + Charset1_Range::static_size * sid_ranges.length, false);
|
||||
Charset1 *fmt1 = c->allocate_size<Charset1> (Charset1::get_size_for_ranges (sid_ranges.length), false);
|
||||
if (unlikely (!fmt1)) return_trace (false);
|
||||
hb_codepoint_t all_glyphs = 0;
|
||||
for (unsigned int i = 0; i < sid_ranges.length; i++)
|
||||
@@ -546,7 +546,7 @@ struct Charset
|
||||
|
||||
case 2:
|
||||
{
|
||||
Charset2 *fmt2 = c->allocate_size<Charset2> (Charset2::min_size + Charset2_Range::static_size * sid_ranges.length, false);
|
||||
Charset2 *fmt2 = c->allocate_size<Charset2> (Charset2::get_size_for_ranges (sid_ranges.length), false);
|
||||
if (unlikely (!fmt2)) return_trace (false);
|
||||
hb_codepoint_t all_glyphs = 0;
|
||||
for (unsigned int i = 0; i < sid_ranges.length; i++)
|
||||
|
||||
Reference in new issue
Block a user