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

Recognize unicodes as well as glyph names in the glyph name field #10

Open
ryanbugden opened this issue Oct 7, 2023 · 7 comments
Open
Labels
enhancement New feature or request

Comments

@ryanbugden
Copy link

Traceback (most recent call last):
  File "/Applications/RoboFont-4_4b2.app/Contents/Resources/lib/python3.9/vanilla/vanillaEditText.py", line 11, in controlTextDidChange_
  File "/Applications/RoboFont-4_4b2.app/Contents/Resources/lib/python3.9/vanilla/vanillaBase.py", line 520, in action_
  File "/Applications/RoboFont-4_4b2.app/Contents/Resources/lib/python3.9/ezui/items/textField.py", line 463, in _internalCallback
  File "main.py", line 342, in glyphNamesTextBoxCallback
  File "lib/fontObjects/fontPartsWrappers.pyc", line 1866, in __getitem__
KeyError: "No glyph named '1'."
@ryanbugden
Copy link
Author

Maybe this was from a v1 copy

@colinmford
Copy link
Member

at the moment the glyph name field only accepts glyph names, so if you want the one glyph you need to type one instead of 1... an enhancement would be to recognize unicodes as well as glyph names, perhaps

@colinmford colinmford reopened this Oct 9, 2023
@colinmford colinmford added the enhancement New feature or request label Oct 9, 2023
@colinmford colinmford changed the title Traceback Recognize unicodes as well as glyph names in the glyph name field Oct 9, 2023
@ryanbugden
Copy link
Author

ryanbugden commented Oct 9, 2023

Related: Tal wrote some code a while ago that acts as an auto-complete for glyph names. I use it for throwing a current foreground glyph into the background:
https://gist.github.com/ryanbugden/a7b946f786dce9cfd92853cdc827aeb1#file-throw_glyph_bg-py-L148

cc @typesupply

@typesupply
Copy link

Would you want this behavior built into ezui? I have wanted this...

@ryanbugden
Copy link
Author

Would you want this behavior built into ezui? I have wanted this...

@typesupply That would be sick! Would it be like a descriptionData entry for TextField called something like autoCompleteData and take a list?

@colinmford
Copy link
Member

@typesupply it would be very cool to have that in ezui!

@typesupply
Copy link

I've opened an issue over at ezui. I'll try to get to this after I finish drawing this 6 that refuses to be drawn. It should be pretty easy to implement. I'll probably use the name autoCompleteValues or something like that and allow a list of values [A, Aacute, ...] or a dict of display values to matched values {A:A, Aacute: Aacute, Á:Aacute, 0x00C1:Aacute, ...} so we can have more complex matching when desired.

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

No branches or pull requests

3 participants