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

[designspace] Allow axes to be identified by tag as well as by name #3436

Open
Lorp opened this issue Feb 2, 2024 · 3 comments
Open

[designspace] Allow axes to be identified by tag as well as by name #3436

Lorp opened this issue Feb 2, 2024 · 3 comments

Comments

@Lorp
Copy link

Lorp commented Feb 2, 2024

It would be convenient, especially when hacking XML .designspace documents, to be able to refer to an axis by its 4-character tag (e.g. "wdth") rather than its human-readable name (e.g. "Width"). Note that, in practice, axis tags are less likely to change during development than axis names, so if there is a name change, most of the XML can remain unchanged. It also makes code easier to reuse and to write without errors, since axis tags are standardized but axis names are not.

This would apply to (at least):

  • <sources><source><location><dimension tag="????">
  • <instances><instance><location><dimension tag="????">
  • <rules><rule><conditionset><condition tag="????">
  • <mappings><mapping><input><dimension tag="????">

I do not propose that support for axis names is removed.

@behdad
Copy link
Member

behdad commented Feb 2, 2024

The cleanest way to do this, such that the Python API is not changed, would be to convert the tag to name in the Python object...

@justvanrossum
Copy link
Collaborator

In retrospect, perhaps the tag should have been the identifier. I think it's too late to change now, and allowing both will cause more confusion than it solves. So -1 from me.

@Lorp
Copy link
Author

Lorp commented Mar 26, 2024

Related: if two axes have identical tags, must they have identical names?

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