mekkablue / Glyphs-Scripts

Python scripts for the Glyphs font editor
http://glyphsapp.com/
Apache License 2.0
387 stars 103 forks source link

Brace and Bracket Manager can’t delete values #303

Closed clauseggers closed 1 year ago

clauseggers commented 1 year ago

I tried to replace the occurrences of the value ‘5’ with ‘’ (nothing). That gave the following error:

Brace and Bracket Manager Report for Playfair
/Users/claus/Git/clauseggers/Playfair/sources/Playfair-2_1-Roman.glyphs

Brace and Bracket Manager Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "Brace Layer Manager.py", line 193, in BraceLayerManagerMain
    replaceWith = int(self.pref("newCoordinate"))
ValueError: invalid literal for int() with base 10: ''
clauseggers commented 1 year ago

Here is another one in the B&B manager:

Brace and Bracket Manager Report for Playfair
/Users/claus/Git/clauseggers/Playfair/sources/Playfair-2_1-Roman.glyphs

🔢 Attempting Optical size: 401 → 410
  🔠 1. _E-middlestroke-cy
  🔠 2. _E-middlestroke-cy
  🔠 3. _E-middlestroke-cy
  🔠 4. _E-middlestroke-cy
  🔠 5. _E-middlestroke-cy
  🔠 6. _E-middlestroke-cy
  🔠 7. _E-middlestroke-cy
  🔠 8. _E-middlestroke-cy
Brace and Bracket Manager Error: 'a01'
Traceback (most recent call last):
  File "Brace Layer Manager.py", line 222, in BraceLayerManagerMain
    axisLimits = axisRules[axisID]
  File "_convenience_mapping.py", line 18, in __getitem__objectForKey_
    return container_unwrap(res, KeyError, key)
  File "_convenience.py", line 113, in container_unwrap
    raise exc_type(*exc_args)
KeyError: 'a01'

I selected three glyphs that had a 401 value in the first axis, but your script choked on something.

mekkablue commented 1 year ago

I tried to replace the occurrences of the value ‘5’ with ‘’ (nothing).

You want to disable the special layer?

clauseggers commented 1 year ago

No, just change the value from [5<oz<410] to [oz<410]