Delete note in FontLab?

Goran Soderstrom
8.Jul.2008 1.52pm
Goran Soderstrom's picture

For me on a mac, it is impossible to take away the notes.

In the manual it is written that I should delete the text in the note, and then close it.

I do this, but the note is still there.

Can anyone delete notes at all?

Cheers



Stephen Rapp
8.Jul.2008 1.56pm
Stephen Rapp's picture

That works for me and I’m on a mac. Are you doing it from the font window or from the individual glyph window? Maybe that makes a difference.


Goran Soderstrom
8.Jul.2008 2.12pm
Goran Soderstrom's picture

I just tried both, nothing happens. The note stays there.

I open the note – delete the text inside the note – and then just close it.

Is that how you do also?
Thanks for helping.


Stephen Rapp
8.Jul.2008 2.59pm
Stephen Rapp's picture

I just tried it on a font. I opened it from the glyph cell in the main font window, deleted the text and closed. The note was still there as you said. Then I opened the glyph widow for that cell and opened the note from there. The text was still in it even. I deleted the text from there, closed it and it did go away.

That seems like a small bug in the program, but it did work for me from the glyph window.


RamiroE
9.Jul.2008 3.36am
RamiroE's picture

Hi Goran,

Why don’t you try the following script:

———————————————

from robofab.world import CurrentFont

f = CurrentFont()
for g in f:
g.note = “”
g.update()

———————————————

It should blank all notes.
(note that you will have to have Robofab installed).

Cheers.


Goran Soderstrom
9.Jul.2008 6.55am
Goran Soderstrom's picture

Ramiro,

Thanks for helping out.

Do you mean I should just copy/paste that in to a new program in the macro editor and hit play? If so, then this result is produced in the Output-panel:

——————————————————————

File “”, line 7
g.note = “”
^
IndentationError: expected an indented block

Did I do something wrong?

It is amazing that a simple task as removing a note should be so hard ;-) Why dont they just add a command “delete note”?


RamiroE
9.Jul.2008 7.29am
RamiroE's picture

Hi Goran,

Sorry, my mistake. Indentations are important in loops:

from robofab.world import CurrentFont

f = CurrentFont()
for g in f:
—g.note = “”
—g.update()

(copy & paste but **replace the mdashes before g.note and g.update() for single indentations**)

This should work fine if you have Robofab installed.

Greetings.


Goran Soderstrom
9.Jul.2008 8.30am
Goran Soderstrom's picture

Ramiro,

My english is not that good – I dont understand the word “indentations”.

I should replace the emdash – with what?

Thanks for having patience :)


RamiroE
9.Jul.2008 9.45am
RamiroE's picture

http://en.wikipedia.org/wiki/Indentation

Mmmmhhh... It is the ’TAB’ key.

In mac keyboard, on the left, the arrow key that is above ’Caps Lock’.

Greetings.


eigi
9.Jul.2008 10.58pm
eigi's picture

The same script without robofab:

for g in fl.font.glyphs:
    g.note = ''
fl.UpdateFont(fl.ifont)

Remove all notes in the current font.

Eigi


Goran Soderstrom
10.Jul.2008 2.05am
Goran Soderstrom's picture

Thanks!

Got it working! :)


RamiroE
10.Jul.2008 4.09am
RamiroE's picture

:)