Hi! I'm finding that
mojo.canvassomehow crashes my RoboFont whenever there's an error. I don't see anything in the output window, and RF just quits. If I switch to DB's
drawView, I can see the report in the output window (usually a
Is this a known issue, or maybe I'm implementing something incorrectly? I don't have an example right now, but can write one if needed.
is there anything in the
robofont.log(you will find this on
what is your OS?
Here's what the log shows.
To test this, I used the basic
vanilla.EditTextinstead of SpaceCenter's
GlyphSequenceEditText. When I get this error with DB's
DrawView, it's logged in the Output window, but won't crash RF.
I'm currently on Sierra, 10.12.6.
(Of course, if I just use
GlyphSequenceEditText, it's fine for the most part, unless I type in
/+ missing glyph.)
I think I see what you are trying to do :)
?will not be a valid glyph name... you need to convert the input string from the
EditTextobject to a list of glyph names.
from defconAppKit.tools.textSplitter import splitText font = CurrentFont() print splitText(u“héllo world?”, font.getCharacterMapping(), fallback=“.notdef”)
The crash happens because it goes wrong while drawing on screen and that is the worst place to raise a traceback...
Right — I understand why I got that error, but I'm curious why
DrawViewdoesn't? It's also not specific to that error (sorry, I probably should've mentioned this earlier).
Here's another example from the log:
Sidenote: On top of using
splitText), I've also had to use a try/except block because while the
.notdeffallback is returned when I type in
/?, it doesn't do it for something like
DrawBot only sets pdf data in the
DrawViewwhen the script is done. With a
Canvasview you draw directly while its refreshing the view. The is lots faster but also fragile.
Already implemented in the next RoboFont updates is that a
Canvasobject catches errors while sending notifications (like
mouseDown, ...) to a delegate object.
jesentanadi last edited by jesentanadi
Ah, makes total sense!
(I guess I should have realized the difference since I had to use DrawView's
setPDFDocument(pdf)function... haha :smirk: )
Thanks for the response. The Canvas update sounds great!