I am trying to learn what I can do with activeEditViewController() and graphicView() but I have no idea how to see the help of them. I saw Core section of Glyphs reference but it didn’t help much. How should I do it?
I specifically want to know how to display text in an edit view with different layers. I know how to set a plain text, but don’t know how to change the layer in each glyph.
Thanks. Wow, this is complicated. It seems that it depends on the cursor position?
What I want to do is to throw a new text in a tab; textA in the first master/layer and textB in the second, in the same tab. Like line 1 in Regular and line 2 in Bold. How can I do that?
Hi Tosche.
Could you please post the entire code of your solution?
I’m currently working on improving the Python documentation, and maybe I can even make some form of a shortcut for your problem. Seems like a good idea.
Thanks.
Thanks for the interest, Yanone. I want to post it on Github next week but the script contains other person’s work, which I am waiting for approval. So, please wait for a little while.
Okay.
Meanwhile Georg has agreed on a completely new implementation of something like font.tabs, something which was missing for a while, and which we’ll cover in the Python API, of course, as soon as possible.
Congratulations on the update to 2.1 and the Python wrapper! Unfortunately I have a problem using tabs the new way. When I run a code like this ( print font.tabs[0].text ), it says “AttributeError: ‘NSKVONotifying_GSFont’ object has no attribute ‘tabs’”. I’m using build 267. Can you help?
Thanks, after deleting glyphsapp.py it started to work. I have some other py files (GSPen.py, objectsGS.py). I have my problem solved, but do they need to be thrown away too?
Actually it accepts the code but all sorts of weird things are happening around the tab.
font.tabs[-1].text=“abc” correctly displays abc in the last tab. I can print the tabs[-1].text too.
font.newTab(“abc”) results in instant crash.
font.newTab("") sometimes opens a new tab, but opens a grey blank tab, not white, where you can do nothing until you change zoom size. Other times it crashes (seems to depend on what tool you are using at the moment?)
Other times it makes the entire window grey blank, or UI keep extending rapidly in horizontal, slowly in vertical direction, or causes all sorts of weird stuff, so much so it’s rather entertaining.