mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 18:13:53 +01:00
[subset] Skip GPOS value format optimization for avar2
Don't compute effective value formats using layout_variation_idx_delta_map when has_avar2 is true. The delta map contains wrong deltas (computed from intermediate-space coords, not final coords) and could incorrectly strip device table format flags, breaking GPOS variation references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
483bd446cb
commit
c6b0cd5e07
4 files changed
+4
-4
No files matched your search
@@ -156,7 +156,7 @@ struct PairPosFormat1_3
|
||||
|
||||
hb_pair_t<unsigned, unsigned> newFormats = hb_pair (valueFormat[0], valueFormat[1]);
|
||||
|
||||
if (c->plan->normalized_coords)
|
||||
if (c->plan->normalized_coords && !c->plan->has_avar2)
|
||||
{
|
||||
/* all device flags will be dropped when full instancing, no need to strip
|
||||
* hints, also do not strip emtpy cause we don't compute the new default
|
||||
|
||||
@@ -312,7 +312,7 @@ struct PairPosFormat2_4 : ValueBase
|
||||
|
||||
hb_pair_t<unsigned, unsigned> newFormats = hb_pair (valueFormat1, valueFormat2);
|
||||
|
||||
if (c->plan->normalized_coords)
|
||||
if (c->plan->normalized_coords && !c->plan->has_avar2)
|
||||
{
|
||||
/* in case of full instancing, all var device flags will be dropped so no
|
||||
* need to strip hints here */
|
||||
|
||||
@@ -149,7 +149,7 @@ struct SinglePosFormat1 : ValueBase
|
||||
|
||||
unsigned new_format = valueFormat;
|
||||
|
||||
if (c->plan->normalized_coords)
|
||||
if (c->plan->normalized_coords && !c->plan->has_avar2)
|
||||
{
|
||||
new_format = valueFormat.get_effective_format (values.arrayZ, false, false, this, &c->plan->layout_variation_idx_delta_map);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ struct SinglePosFormat2 : ValueBase
|
||||
;
|
||||
|
||||
unsigned new_format = compute_effective_format (c->plan->source, it,
|
||||
bool (c->plan->normalized_coords),
|
||||
bool (c->plan->normalized_coords) && !c->plan->has_avar2,
|
||||
bool (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING),
|
||||
c->plan->has_gdef_varstore,
|
||||
&c->plan->layout_variation_idx_delta_map);
|
||||
|
||||
Reference in new issue
Block a user