question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[varLib] Clarification regarding avar segment maps

See original GitHub issue

The avar spec says:

Axis value maps can be provided for any axis, but are required only if the normalization mapping for an axis is being modified. If the segment map for a given axis has any value maps, then it must include at least three value maps: -1 to -1, 0 to 0, and 1 to 1. These value mappings are essential to the design of the variation mechanisms and are required even if no additional maps are specified for a given axis.

  1. Currently, varLib._add_fvar_avar doesn’t enforce this. Should it?

  2. When an axis doesn’t cover the full range from -1 to 1, it makes no sense to include the entries as described.

For example, take a wdth axis from Condensed to Normal. The mappings may be:

-1.0 to -1.0
-0.5 to -0.3
 0.0 to  0.0

What would an additional 1 to 1 mapping, as required by the spec, do? There is no master at 1.0 for this axis. If something has to be added to the segment map, it should be 1.0 to 0.0, making the range from 0 to 1 effectively flat. If that is the intent of the spec, the wording should be changed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
PeterConstablecommented, Jul 21, 2017

Yes, varLib should enforce this to ensure fonts are valid. This is an old requirement, originating in GX:

“A segment must always have at least three correspondence pairs: minus one mapping to minus one, zero mapping to zero, and one mapping to one.”

Your example considers a width axis from Condensed to Normal, but those values are defined only in “user” space, not normalized space. The ‘avar’ table is a transformation entirely within normalized space which is always defined as having axes going from -1 to +1. An ‘fvar’ table may happen to define an axis in which default and min or default and max are the same, in which case nothing changes between -1 and 0, or between 0 and +1. But that is a consideration in the mapping from “user” space to normalized space that is independent of the ‘avar’ transformation that happens entirely within normalized space.

0reactions
jenskutilekcommented, Jul 24, 2017

Thanks all. #1014 fixes the issue about the default mappings. The rest was a misinterpretation on my part.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Varnish fails to start with : failed to map segment from shared ...
As part of varnish's startup, it generates a loadable library of the configuration of it's behaviour. This gets compiled and loaded at run-time...
Read more >
CrashPlan GUI problem. App not launching - Ubuntu Forums
The service (CrashPlanEngine) seems to be running fine, it is the java based GUI app (CrashPlanDesktop) that is not launching (without giving any...
Read more >
Untitled
#impossible Pratten park map, Black banded sea krait, Paakinahon liikenne ... Lr13a, Scuba diving effect on coral reefs, Avatar chu nt, Descargar snake...
Read more >
Maps | VTA
VTA System Maps Downtown San Jose Map Main Map. ... vta.org/covid-19. VTA recommends, but no longer requires, masks on board.
Read more >
Untitled
Resolves: Bug 1623935 - upgrade of 389-ds-base could remove replication ... via hanging secured connections - Resolves: Bug 1695014 - Clarify the ability...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found