Fontinspector Run2

Hi all,

after a while I had a look to the FONTINSPECTOR PY of URTD.
(Can see on github: urtd/fontinspector)

Now I was suprised, that there is be a 1.2 Version, which seems to support glyphs (The comments in code does this…)

But this Script doesnt work… mmh :

When I trying to generate fontinspector-file for a component-glyphs
I got these error messages:

–––Traceback (most recent call last):
–––File “FontInspector_v1_2_.py”, line 238, in
–––svgG += ‘<g transform="translate(’ + str(offset) + ‘,-’ + str(dB) + ‘)" –––class=“glyph”>’
–––File “FontInspector_v1_2_.py”, line 22, in svg
–––new.appendGlyph(g)
–––File “/Folder/RoboFab/RoboFab/Lib/robofab/objects/objectsBase.py”, line –––1521, in appendGlyph
–––aGlyph.drawPoints(pen)
–––File “/Folder/RoboFab/RoboFab/Lib/robofab/objects/objectsBase.py”, line –––1506, in drawPoints
–––c.drawPoints(pen)
–––File “/Folder/RoboFab/RoboFab/Lib/robofab/objects/objectsBase.py”, line –––2760, in drawPoints
–––pen.addComponent(self.baseGlyph, (sX, 0, 0, sY, oX, oY))
–––File “/Users/Oliver/Library/Application Support/Glyphs/Scripts/GSPen.py”
–––line 78, in addComponent
–––Component = GSComponent()
–––TypeError: Component__init
_() takes at least 2 arguments (1 given)

When I trying to generate fontinspextor-file for a “regular-outline”-glyphs
I got these error messages:

–––Traceback (most recent call last):
–––File “FontInspector_v1_2_.py”, line 238, in
–––svgG += ‘<g transform="translate(’ + str(offset) + ‘,-’ + str(dB) + ‘)" –––class=“glyph”>’
–––File “FontInspector_v1_2_.py”, line 64, in svg
–––font.removeGlyph(‘fontinspector’)
–––File “/Users/Oliver/Library/Application Support/Glyphs/Scripts/objectsGS.py”
–––,line 420, in removeGlyph
–––if self._object.has_key(glyphName):
–––AttributeError: ‘NSKVONotifying_GSDocument’ object has no attribute –––‘has_key’

Now:
Is this a Script-, RoboFab-, or Glyphs-Problem? Could it be fixed?

Thx
Nevu

Version of OS, App? Do you have objectsGS.py installed?

I had to fix thing in several places. But it works. I will update it tomorrow.

@all

thanks,

Version:
osx 10.9.5,
newest glyphs/glyphs2, and also newest objectGS.py

nevertheless:

I tried to push something around in the code …

One Problem seems to be the (great) possibility to make a ‘component’ od a ‘component’ … So the Script can’t make a ‘decomposed’ copy. But Im not sure. And its late :).

Waiting for tomorrow.

mmh,

I was looking for the newest pt-file on github,
but it still doesn’t work

(script makes a copy of component-glyph [not copy all comp…], but then crashes … maybe because there is a comp in comp in comp …)

I don’t know wether urtd is still on this project … mmh

MESSAGES:

(WHILE USING A ‘COMP-IN-COMP’ GLYPH)

Start
Traceback (most recent call last):
File “fontinspector.py”, line 240, in
File “fontinspector.py”, line 22, in svg
File “/Folder/RoboFab/RoboFab/Lib/robofab/objects/objectsBase.py”, line 1521, in appendGlyph
aGlyph.drawPoints(pen)
File “/Folder/RoboFab/RoboFab/Lib/robofab/objects/objectsBase.py”, line 1506, in drawPoints
c.drawPoints(pen)
File “/Folder/RoboFab/RoboFab/Lib/robofab/objects/objectsBase.py”, line 2760, in drawPoints
pen.addComponent(self.baseGlyph, (sX, 0, 0, sY, oX, oY))
File “/Users/Oliver/Library/Application Support/Glyphs/Scripts/GSPen.py”, line 78, in addComponent
Component = GSComponent()
TypeError: Component__init
_() takes at least 2 arguments (1 given)
End

(WHILE USING A ‘NORMAL’ GLYPH)

Start
Traceback (most recent call last):
File “fontinspector.py”, line 240, in
File “fontinspector.py”, line 66, in svg
File “/Users/Oliver/Library/Application Support/Glyphs/Scripts/objectsGS.py”, line 420, in removeGlyph
if self._object.has_key(glyphName):
AttributeError: ‘NSKVONotifying_GSDocument’ object has no attribute 'has_key’
End

Have you also updated the objectGS.py and GSPen.py (from https://github.com/schriftgestalt/Glyphs-Scripts)?

mmmh, yes i do it again, no errors anymore, but:

seems to work only for 1 instance/ 1 master ?!

Sorry, now i know: its for “open-fonts” not for masters or instances … Mmm would be nice for instances to … I will have a slow look to this (its not possible to keep those features for FL, hm?)