<?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[is there a way to convert defcon glyph object to RGlyph?]]></title><description><![CDATA[<p dir="auto">it is again me, maybe again with a quite trivial question</p>
<p dir="auto"><code>glyphWindow.getGlyph()</code> returns defcon object.<br />
I want to use it like an RGlyph (the method which usually uses RGlyph as a parameter, in some cases has to glyphWindow.getGlyph()) to access the points. Like this:</p>
<pre><code class="language-Python">from mojo.UI import AllGlyphWindows
for glyphWindow in AllGlyphWindows():
   glyphWindow.getGlyph()[0].points # throws error, because it doesn't have points attr, and RFont does
</code></pre>
<p dir="auto">Is there a way to get RFont out of Defcon object? or to treat defcon glyph like fontParts glyph object?<br />
Or you think that I should create another method for defcon objects than for RFont that does the same thing? (I guess making more methods can cause more troubles with the debugging in the future)</p>
]]></description><link>https://forum.robofont.com/topic/627/is-there-a-way-to-convert-defcon-glyph-object-to-rglyph</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 23:25:56 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/627.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Apr 2019 17:12:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to is there a way to convert defcon glyph object to RGlyph? on Thu, 25 Apr 2019 18:00:35 GMT]]></title><description><![CDATA[<p dir="auto">it is again me, maybe again with a quite trivial question</p>
<p dir="auto"><code>glyphWindow.getGlyph()</code> returns defcon object.<br />
I want to use it like an RGlyph (the method which usually uses RGlyph as a parameter, in some cases has to glyphWindow.getGlyph()) to access the points. Like this:</p>
<pre><code class="language-Python">from mojo.UI import AllGlyphWindows
for glyphWindow in AllGlyphWindows():
   glyphWindow.getGlyph()[0].points # throws error, because it doesn't have points attr, and RFont does
</code></pre>
<p dir="auto">Is there a way to get RFont out of Defcon object? or to treat defcon glyph like fontParts glyph object?<br />
Or you think that I should create another method for defcon objects than for RFont that does the same thing? (I guess making more methods can cause more troubles with the debugging in the future)</p>
]]></description><link>https://forum.robofont.com/post/2281</link><guid isPermaLink="true">https://forum.robofont.com/post/2281</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Thu, 25 Apr 2019 18:00:35 GMT</pubDate></item><item><title><![CDATA[Reply to is there a way to convert defcon glyph object to RGlyph? on Thu, 25 Apr 2019 21:05:27 GMT]]></title><description><![CDATA[<p dir="auto">hi Rafał, I’ve been there too :)</p>
<p dir="auto">you can wrap an RGlyph around a defcon glyph, like this:</p>
<pre><code class="language-python">for glyphWindow in AllGlyphWindows():
    # get RGlyph from defcon glyph
    g = RGlyph(glyphWindow.getGlyph())
    # do stuff using the FontParts API
    print(g[0].points)
</code></pre>
<p dir="auto">succes!</p>
]]></description><link>https://forum.robofont.com/post/2282</link><guid isPermaLink="true">https://forum.robofont.com/post/2282</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Thu, 25 Apr 2019 21:05:27 GMT</pubDate></item></channel></rss>