Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avar3: Multi layered virtual masters #161

Open
davelab6 opened this issue Nov 8, 2024 · 10 comments
Open

avar3: Multi layered virtual masters #161

davelab6 opened this issue Nov 8, 2024 · 10 comments

Comments

@davelab6
Copy link
Contributor

davelab6 commented Nov 8, 2024

It is useful to be able to develop 'atomic' parametric axes (like XOPQ, XTRA) and then mid level 'molecule' virtual axes (that combine them in specific proportions) that are then used to blend top level 'user' axes (weight, width, opsz).

I request this based on discussions with @dberlow and @Lorp

@justvanrossum
Copy link
Collaborator

Is this about:

  1. expressing things that are impossible to express with avar2
  2. expressing things that are hard to express with avar2

?

@behdad
Copy link
Member

behdad commented Nov 8, 2024

We should first rule out that this is not just a compiler distilling to avar2. I'll think about that.

@Lorp
Copy link
Collaborator

Lorp commented Nov 8, 2024

Here is a simple example of "multi-layer avar" (hmm, how many layers is this? fences or fenceposts?), using subscript digits to indicate the axis layer number:

  • wght₀ controls XOPQ₁, XTRA₁, YOPQ₁
    • XOPQ₁ controls XOUC₂, XOLC₂, XOFI₂
    • XTRA₁ controls XTUC₂, XTLC₂, XTFI₂
    • YOPQ₁ controls YOUC₂, YOLC₂, YOFI₂

xxUC, xxLC, xxFI mean uppercase, lowercase, figures respectively.

(I prefer the 'control' metaphor to the 'blend' metaphor, since that’s the direction inputs turn into outputs when the font is in use.)

During the avar2 design process, @behdad wondered if to allow more than 1 mapping layer. I confess I resisted it because of complexity, and I don’t think a spec concept emerged. However I think if we allow axisIndexMap to contain n * axisCount records, where n is the number of layers, we’re good :) Discussing with @behdad.

@behdad
Copy link
Member

behdad commented Nov 9, 2024

However I think if we allow axisIndexMap to contain n * axisCount records, where n is the number of layers, we’re good :) Discussing with @behdad.

The number of entries in axisIndexMap isn't part of the API of that structure. Let's not jump to a design yet, before we settle on the need and scope.

@behdad
Copy link
Member

behdad commented Nov 9, 2024

We should first rule out that this is not just a compiler distilling to avar2. I'll think about that.

I'm convinced myself that distilling it to avar2 will explode the number of tents. So, I'm happy to work on a avar3 to address that. It looks like we just need to add a numLayers item, and the rest can be deduced.

@Lorp
Copy link
Collaborator

Lorp commented Nov 9, 2024

SGTM

@justvanrossum
Copy link
Collaborator

I'm convinced myself that distilling it to avar2 will explode the number of tents.

How is a high number of tents an actual problem?

@behdad
Copy link
Member

behdad commented Dec 1, 2024

I'm convinced myself that distilling it to avar2 will explode the number of tents.

How is a high number of tents an actual problem?

Okay I confess, I haven't actually figured out how to work out the conversion.

If we know how to merge two layers, then the rest follows.

What I had in mind was roughly that, for each linear piece of the piece-wise-linear mapping from the first layer, we need to insert all the segments from the second layer that are in range.

I'll think more about it, see if I can actually prototype. But with multi dimensions it becomes really crazy to wrap one's head around.

@justvanrossum
Copy link
Collaborator

it becomes really crazy to wrap one's head around

I worry about this. avar2 is already quite complex, and hard to explain to designers. To add another dimension (hah!) of complexity should not be a light decision.

@davelab6
Copy link
Contributor Author

davelab6 commented Dec 2, 2024

Perhaps that is where the 'blending' metaphor is useful, then. If you have a paint palette and you blend 2 primary colors you get a secondary color. With two secondary colors blended, you get a tertiary color. There are many common ways to visualize this kind of simple tree structure, like the "mind maps" of any business class and "playoff" maps of any sports tournament :)

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants