<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to add some graphic label to the glyph cell in font overview]]></title><description><![CDATA[<p dir="auto">Hi Guys,<br />
I would like to add a system of marking the changes to my script.</p>
<p dir="auto">For different reasons, it cannot affect color marking (<code>glyph.colorMark</code>).<br />
The obvious solution for me would be drawing some graphic label on top of the glyph cells in the font overview. Is there any way to achieve that?</p>
<p dir="auto">Thanks in advance for your help!</p>
]]></description><link>https://forum.robofont.com/topic/578/how-to-add-some-graphic-label-to-the-glyph-cell-in-font-overview</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 05:12:49 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/578.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Feb 2019 10:47:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 11:24:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi Guys,<br />
I would like to add a system of marking the changes to my script.</p>
<p dir="auto">For different reasons, it cannot affect color marking (<code>glyph.colorMark</code>).<br />
The obvious solution for me would be drawing some graphic label on top of the glyph cells in the font overview. Is there any way to achieve that?</p>
<p dir="auto">Thanks in advance for your help!</p>
]]></description><link>https://forum.robofont.com/post/2001</link><guid isPermaLink="true">https://forum.robofont.com/post/2001</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Tue, 05 Feb 2019 11:24:22 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 11:22:57 GMT]]></title><description><![CDATA[<p dir="auto">there are some glyph cell view notifications:</p>
<ul>
<li><code>glyphCollectionDraw</code> is called and provides the collection view. You can draw on top of all the glyph cells.</li>
<li><code>glyphCellDraw</code> is called for each glyph cell, you can draw additional data inside each cell, this is in glyph coordinates space. The notification provides the <code>glyph</code>, the <code>glyphCell</code> view and the <code>rect</code> of the cell.</li>
</ul>
<p dir="auto">hope this helps!!</p>
]]></description><link>https://forum.robofont.com/post/2002</link><guid isPermaLink="true">https://forum.robofont.com/post/2002</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Tue, 05 Feb 2019 11:22:57 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 12:30:22 GMT]]></title><description><![CDATA[<p dir="auto">I'm not sure if this way of dealing with the problem is proper:<br />
let's say that I have a list of glyph names that were somehow changed by the "Action".</p>
<p dir="auto">I'm labelling the glyphs from the list by:</p>
<ol>
<li>checking if the event's glyph is in that list</li>
<li>refreshing the glyphs in that list with <code>glyph.changed()</code></li>
</ol>
<pre><code class="language-Python">from mojo.events import addObserver, removeObserver
from mojo.drawingTools import *
import vanilla
class Test:
    def __init__(self):
        self.w = vanilla.FloatingWindow((200,50),"TEST")
        self.w.bind("close", self.closeCB)
        self.w.open()
        self.w.button = vanilla.SquareButton((0,0,-0,-0),"Action",callback=self.actionCB)
        addObserver(self,"drawCell","glyphCellDraw")
        self.changedGlyphs = []
        self.f = CurrentFont()
        
    def drawCell(self, info):
        glyphName = info["glyph"].name
        if glyphName in self.changedGlyphs:
            fill(1,0,0)
            rect(0,0,10,10)
        
    def actionCB(self,sender):
        self.changedGlyphs = ["a","b","c"]
        # making sure that cells will be labeled:
        # (are cells only labeled after the glyph.changed()?)
        for glyphName in self.changedGlyphs:
            self.f[glyphName].changed()
        
    def closeCB(self,sender):
        removeObserver(self,"glyphCellDraw")
        
        # cleaning the cells
        for glyphName in self.changedGlyphs:
            self.f[glyphName].changed()
        
        
Test()
</code></pre>
<p dir="auto">Is it ok? or there is there a better way to achieve that?</p>
]]></description><link>https://forum.robofont.com/post/2003</link><guid isPermaLink="true">https://forum.robofont.com/post/2003</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Tue, 05 Feb 2019 12:30:22 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 17:35:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/207">@RafaŁ-Buchner</a> makes sense to me. nice example for the docs :)</p>
]]></description><link>https://forum.robofont.com/post/2004</link><guid isPermaLink="true">https://forum.robofont.com/post/2004</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Tue, 05 Feb 2019 17:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 18:12:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/22">@gferreira</a><br />
Thanks, feel free to use it</p>
]]></description><link>https://forum.robofont.com/post/2005</link><guid isPermaLink="true">https://forum.robofont.com/post/2005</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Tue, 05 Feb 2019 18:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 21:34:10 GMT]]></title><description><![CDATA[<p dir="auto">I would store your data in the <code>glyph.lib</code> and draw from the lib data.</p>
<pre><code class="language-python">glyph.lib["com.rafalbuchner.toolName"] = "changedToSomething"
</code></pre>
<pre><code class="language-python">def drawCell(self, info):
    glyph = info["glyph"]
    data = glyph.lib.get("com.rafalbuchner.toolName")
    if data:
        fill(1,0,0)
        rect(0,0,10,10)
</code></pre>
<p dir="auto">the big advantage is the glyph get proper updates when you set or change the data in the glyph.lib.</p>
<p dir="auto">good luck!!</p>
]]></description><link>https://forum.robofont.com/post/2006</link><guid isPermaLink="true">https://forum.robofont.com/post/2006</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Tue, 05 Feb 2019 21:34:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Tue, 05 Feb 2019 22:09:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a> Thanks!</p>
]]></description><link>https://forum.robofont.com/post/2007</link><guid isPermaLink="true">https://forum.robofont.com/post/2007</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Tue, 05 Feb 2019 22:09:39 GMT</pubDate></item><item><title><![CDATA[Reply to How to add some graphic label to the glyph cell in font overview on Wed, 13 Feb 2019 12:03:04 GMT]]></title><description><![CDATA[<p dir="auto">added to the docs as an <a href="http://robofont.com/documentation/building-tools/toolspace/observers/custom-label-in-glyph-cells/" rel="nofollow">example</a>. thanks!</p>
]]></description><link>https://forum.robofont.com/post/2050</link><guid isPermaLink="true">https://forum.robofont.com/post/2050</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Wed, 13 Feb 2019 12:03:04 GMT</pubDate></item></channel></rss>