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

Small requests and a big one: Read existing avar2 data #10

Open
davelab6 opened this issue May 20, 2024 · 13 comments
Open

Small requests and a big one: Read existing avar2 data #10

davelab6 opened this issue May 20, 2024 · 13 comments

Comments

@davelab6
Copy link

I reviewed https://lorp.github.io/fencer/src/fencer.html today with @dberlow :) Following that chat I have some suggestions:

  1. Make the preview panes of named instances removable
  2. Make the 'window size' of each pane adjustable
  3. Make the order of the panes adjustable; it will be useful to have the canvas large and 1 render pane right of it
  4. Add a toggle to wrap the text contents of a pane, and add basic font-size/line-height controls (behind the existing control panel modal); its important to define opsz by seeing text 'at actual size'
  5. In Mappings Visual pane, Allow the user to define the resolution of the space sampling grid for more/less magnetic field arrows
  6. In Mappings Visual pane, add a toggle between magnetic field arrows and a color gradients, similar to old school Superpolator
  7. In Mappings Visual pane, prevent the pucks from going outside the pane's grid; its possible to get values outside the axis min/max, which should not be possible
  8. in Mapping XML, checkbox for rounding all values to int

And a big one:

  1. Read existing AVAR2 mappings into the tool, so the tool can be used to inspect them visually. This is a current use-case for Font Bureau, as they are authoring avar2 designSpace Mappings by hand, and want to review them. If the binary avar2 table has data that can't be parsed into the tool, then just alert the user that is so and blank it as it does now.
@dberlow
Copy link

dberlow commented May 20, 2024 via email

@Lorp
Copy link
Owner

Lorp commented May 20, 2024

When you say "showing the existing current" do you mean a rendering of the untransformed font? I’m intending to show untransformed/transformed versions in each render box, perhaps the untransformed always in grey.

@dberlow
Copy link

dberlow commented May 20, 2024 via email

@Lorp
Copy link
Owner

Lorp commented May 21, 2024

For future reviews of Fencer, it may be useful to follow the exercise I recently added to the README :)

@Lorp
Copy link
Owner

Lorp commented May 21, 2024

I’ll get those dual renders working soon, David.

@Lorp
Copy link
Owner

Lorp commented May 21, 2024

Comments on individual requests. I may add individual issue numbers.

  1. Make the preview panes of named instances removable

Good idea. Maybe have the user load Named Instances only if they want.

  1. Make the 'window size' of each pane adjustable

  2. Make the order of the panes adjustable; it will be useful to have the canvas large and 1 render pane right of it

Desirable… combined with request 2, the simplest way to do this may be by implementing a draggable UI where windows can be repositioned and resized, their positions & sizes stored in a cookie. Issue #11 is to implement a windowing system.

  1. Add a toggle to wrap the text contents of a pane, and add basic font-size/line-height controls (behind the existing control panel modal); its important to define opsz by seeing text 'at actual size'

Good idea

  1. In Mappings Visual pane, Allow the user to define the resolution of the space sampling grid for more/less magnetic field arrows

Enhancement already intended. Tracked in issue #12. Fixed in 1b8417c.

  1. In Mappings Visual pane, add a toggle between magnetic field arrows and a color gradients, similar to old school Superpolator

Interesting, we can try this. Could be useful to show from where a fenced zone gets its solitary instance.

  1. In Mappings Visual pane, prevent the pucks from going outside the pane's grid; its possible to get values outside the axis min/max, which should not be possible

Covered by #4, fixed in 29abf9f.

  1. in Mapping XML, checkbox for rounding all values to int

Good idea. Added in 0e2bfbc.

And a big one:

  1. Read existing AVAR2 mappings into the tool, so the tool can be used to inspect them visually. This is a current use-case for Font Bureau, as they are authoring avar2 designSpace Mappings by hand, and want to review them. If the binary avar2 table has data that can't be parsed into the tool, then just alert the user that is so and blank it as it does now.

If we can inspect the process that generated the avar2 tables in the tiny number of existing fonts, it may well be possible to reverse engineer those particular cases as mappings. The avar2 transformation model is more powerful than what can be generated by sets of mappings, which means that it’s non obvious how to write a function to convert an avar2 table back to mappings, even if you know it was created from mappings. This is not necessarily the last word on the topic — it’s a desirable thing, and a solution may emerge...

However, reading "authoring avar2 designSpace Mappings by hand" literally, I can confirm that this XML can be simply copied and pasted into Fencer’s XML window, and graphically inspected immediately.

Progress is reading existing avar2 data is now tracked in #25 [Added 2024-07-16]

@Lorp
Copy link
Owner

Lorp commented May 21, 2024

the simplest way to do this may be by implementing a draggable UI where windows can be repositioned and resized

Ok so ChatGPT just wrote me a windowing system https://codepen.io/lorp/pen/YzbqvBN

Prompt: Make a windowing system using CSS and JS?

@Lorp
Copy link
Owner

Lorp commented May 21, 2024

Windowing system is now done :)

Rendering/instances need some more thought. Should they be individual windows? Maybe all Named Instances belong in their own window, treated differently from the Current instance.

@Lorp
Copy link
Owner

Lorp commented May 22, 2024

Added "integer dragging" mode, a reinterpretation of the request "in Mapping XML, checkbox for rounding all values to int". This rounds values when the user is dragging a slider or a graphical marker, but still allows arbitrary values to be entered manually. It also still allows the user to drag to the extremes when they are non-integer.

@Lorp
Copy link
Owner

Lorp commented May 22, 2024

Regarding integer rounding, what I implemented is to set the actual mapping to integer (when you’re dragging and the checkbox is checked). This seems desirable in many cases so I want to keep it; but the request from DC/DB seems to be more about rounding the mappings for the viewer (as in formatting a spreadsheet cell), not the underlying values.

Is this latter rounding definitely desirable? It feels risky, in that users could copy it, thinking those are the real numbers.

@Lorp
Copy link
Owner

Lorp commented May 22, 2024

@dberlow still trying to work out what you mean by "what about showing the existing current with a design space, where the two dimensions that have been chosen, have an origin and an end and arrows in between?" Is it something like I implemented in Samsa, in the "loci" mode? In this view, both axes are somewhere in the middle of their range, and the "railway track" UI shows the set of points where the points will end up, if you were to move each axis along its whole range. In general they are curves, not straight lines.
Screenshot 2024-05-22 at 16 22 17

In a Fencer context, it would make most sense to draw these lines coming from the "shadow" blue current marker, to indicate where it would end up if you move the x-axis axis (blue railway track) or the y-axis axis (red railway track).

@davelab6
Copy link
Author

The tracks visual is cute but a bit of a gimmick; I'd like a toggle to turn it into a simple 1px line

@davelab6
Copy link
Author

The windowing system will benefit from a 'reset' button, as it persists across sessions at the moment.

@davelab6 davelab6 mentioned this issue Oct 15, 2024
11 tasks
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

3 participants