Forum Replies Created
-
AuthorPosts
-
a feature when the earth flips his magnetic field
Cause some times, in exceptional situations up is down.
will be solved in next version :)
He
This will also not work in robofab :)
You can check if a glyphName is in the font:
f = CurrentFont() gname = "test" if gname in f: print gname else: #f[gname] not in f print "%s not in %s" %(gname, f)
good luck
added, will be in the next update :)
thanks for reporting
If I understood it correctly your want to disable (grayed out) an option in a RadioGroup.
from vanilla import * class Test: def __init__(self): self.w = Window((400, 400)) self.w.allOptions = CheckBox((10, 10, -10, 22), "All Options", callback=self.allOptionsCallback) self.w.radioButtons = RadioGroup((10, 40, -10, 80), ["option 1", "option 2", "option 3"]) self.w.radioButtons.getNSMatrix().cellAtRow_column_(2, 0).setEnabled_(False) self.w.open() def allOptionsCallback(self, sender): self.w.radioButtons.getNSMatrix().cellAtRow_column_(2, 0).setEnabled_(sender.get()) Test()
hope this helps
cool
you could change the vanilla.Window to a vanilla.FloatingWindow
A floating window will not became the first responder to actions send by fe. the menu bar.
succes!
He
A list object does not have a
prepareUndo preformUndo
methods.The best way is to tell each glyph while looping over all
glyphNames
toprepareUndo preformUndo
font = CurrentFont() glyphNames = font.selection if not glyphNames: glyphNames = font.keys() for glyphName in glyphNames: glyph = font[glyphName] glyph.prepareUndo("myAction") # action start glyph.move((100, 100)) # action end glyph.performUndo()
You can have multiple undo’s when selecting multiple glyphs in the Font Overview and hit ⌘-Z
Bundling undo states over several glyphs into one undo state isn’t possible cause each glyph has his own undo manager.hope this helps
mm, you can make a subclass of the EditTool and overwrite the
modifyDraggingPoint(point, delta)
method to ignore 45° and only look for 0° and 90° angles.But not pref settings (yet, will think about it)
ah this seems only to be an issue on 10.6…..
great!
thanksHi
I cannot reproduce this issue.
RoboFont version?
OS version?
Is there a transformation on the image?
Any image adjustment? (contrast, brightness,…)mmmm, oke
Im kind of guessing what you want to achieve but maybe this can help to.
A SpaceCenter object also has a setRaw and getRaw methods, expecting a string, text as input or return.
from robofab.interface.all.dialogs import AskString from mojo.UI import CurrentSpaceCenter sp = CurrentSpaceCenter() text = AskString("input") sp.setRaw(text)
(Ive just updated http://doc.robofont.com/api/mojo/mojo-ui/ with getRaw and setRaw)
Everything is depending on the font you want to use and the character unicode mapping inside that font.
you can use something similar:
## this is used internally to split inputted text to a list of glyph names based on the current font from lib.UI.spaceCenter.glyphSequenceEditText import splitText from robofab.interface.all.dialogs import AskString ## get some text text = AskString("input") print "input:", text font = CurrentFont() ## the character map cmap = font.getCharacterMapping() ## split the text based on the camp in to a list of glyph names glyphNameList = splitText(text, cmap) print "as glyph names list:", glyphNameList ## loop over the glyph names asks for their unicode value in the current font ## convert it back to text based on that unicode value backToText = u"" for glyphName in glyphNameList: if glyphName in font: glyph = font[glyphName] if glyph.unicode is not None: backToText += u"%s" %(unichr(glyph.unicode)) else: backToText += "/%s " %glyphName else: backToText += "/%s " %glyphName print "backtoText:", backToText
hope this makes sense.
This is a feature planned feature for the next version.
Something similar like tools and his observers for the Glyph View but enhanced for Space Center.(see http://cl.ly/ExxK :)
It is possible but it will be with some detours….
You can install hTool2 with your local python install. RoboFont adds local site-packages to its own system path so you can use local installed packages.
-
AuthorPosts