<?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[RoboFont crashing on UFO – GlifLibError: line can not have an offcurve.]]></title><description><![CDATA[<p dir="auto">I'm trying to open a UFO, but RoboFont crashes each time. This may be caused by merging different versions of a glyph with Git.</p>
<p dir="auto">The error I'm getting in the RF log is:</p>
<p dir="auto"><code>GlifLibError: line can not have an offcurve.</code></p>
<p dir="auto">So, it seems that I have a corrupted outline somewhere, but it's unclear where, exactly.</p>
<p dir="auto">I can revert a glyph or glyphs to an earlier version if it is causing the problem, but I'd rather not revert everything, as there are quite a few changed glyphs in the branch I'm merging, and that would potentially lose a fair bit of work just to avoid an issue that might be really small.</p>
<p dir="auto">Is there a way that I could find <em>which</em> glyph is failing to open? For instance, is there some way a fontTools script could go through glyphs, printing each name before attempting to open it?</p>
<p dir="auto">I'll report back if I figure this out on my own, but if anyone has any insights, that would be amazing!</p>
<pre><code class="language-console">09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; Traceback (most recent call last):
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "lib/UI/fontOverView/doodleGlyphCollectionView.pyc", line 752, in drawRect_
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defconAppKit/controls/glyphCellView.py", line 509, in drawRect_
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; glyph = self.getGlyph_(glyphName)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "lib/UI/fontOverView/doodleGlyphCollectionView.pyc", line 717, in getGlyph_
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defcon/objects/font.py", line 228, in __getitem__
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; return self._glyphSet[name]
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defcon/objects/layer.py", line 248, in __getitem__
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; self.loadGlyph(name)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "lib/fontObjects/doodleLayer.pyc", line 58, in loadGlyph
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defcon/objects/layer.py", line 173, in loadGlyph
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; self._glyphSet.readGlyph(glyphName=name, glyphObject=glyph, pointPen=pointPen)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 355, in readGlyph
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; _readGlyphFromTree(tree, glyphObject, pointPen, formatVersions=formatVersions, validate=validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 896, in _readGlyphFromTree
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; _readGlyphFromTreeFormat2(tree=tree, glyphObject=glyphObject, pointPen=pointPen, validate=validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 969, in _readGlyphFromTreeFormat2
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; buildOutlineFormat2(glyphObject, pointPen, element, identifiers, validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 1169, in buildOutlineFormat2
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; _buildOutlineContourFormat2(pen, element, identifiers, validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 1194, in _buildOutlineContourFormat2
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; massaged = _validateAndMassagePointStructures(contour, pointAttributesFormat2, validate=validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 1336, in _validateAndMassagePointStructures
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; raise GlifLibError("line can not have an offcurve.")
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; fontTools.ufoLib.errors
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; .
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; GlifLibError
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; :
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; line can not have an offcurve.
</code></pre>
]]></description><link>https://forum.robofont.com/topic/683/robofont-crashing-on-ufo-glifliberror-line-can-not-have-an-offcurve</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 10:48:31 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/683.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 09 Aug 2019 14:16:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RoboFont crashing on UFO – GlifLibError: line can not have an offcurve. on Sat, 10 Aug 2019 06:22:52 GMT]]></title><description><![CDATA[<p dir="auto">I'm trying to open a UFO, but RoboFont crashes each time. This may be caused by merging different versions of a glyph with Git.</p>
<p dir="auto">The error I'm getting in the RF log is:</p>
<p dir="auto"><code>GlifLibError: line can not have an offcurve.</code></p>
<p dir="auto">So, it seems that I have a corrupted outline somewhere, but it's unclear where, exactly.</p>
<p dir="auto">I can revert a glyph or glyphs to an earlier version if it is causing the problem, but I'd rather not revert everything, as there are quite a few changed glyphs in the branch I'm merging, and that would potentially lose a fair bit of work just to avoid an issue that might be really small.</p>
<p dir="auto">Is there a way that I could find <em>which</em> glyph is failing to open? For instance, is there some way a fontTools script could go through glyphs, printing each name before attempting to open it?</p>
<p dir="auto">I'll report back if I figure this out on my own, but if anyone has any insights, that would be amazing!</p>
<pre><code class="language-console">09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; Traceback (most recent call last):
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "lib/UI/fontOverView/doodleGlyphCollectionView.pyc", line 752, in drawRect_
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defconAppKit/controls/glyphCellView.py", line 509, in drawRect_
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; glyph = self.getGlyph_(glyphName)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "lib/UI/fontOverView/doodleGlyphCollectionView.pyc", line 717, in getGlyph_
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defcon/objects/font.py", line 228, in __getitem__
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; return self._glyphSet[name]
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defcon/objects/layer.py", line 248, in __getitem__
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; self.loadGlyph(name)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "lib/fontObjects/doodleLayer.pyc", line 58, in loadGlyph
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/defcon/objects/layer.py", line 173, in loadGlyph
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; self._glyphSet.readGlyph(glyphName=name, glyphObject=glyph, pointPen=pointPen)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 355, in readGlyph
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; _readGlyphFromTree(tree, glyphObject, pointPen, formatVersions=formatVersions, validate=validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 896, in _readGlyphFromTree
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; _readGlyphFromTreeFormat2(tree=tree, glyphObject=glyphObject, pointPen=pointPen, validate=validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 969, in _readGlyphFromTreeFormat2
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; buildOutlineFormat2(glyphObject, pointPen, element, identifiers, validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 1169, in buildOutlineFormat2
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; _buildOutlineContourFormat2(pen, element, identifiers, validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 1194, in _buildOutlineContourFormat2
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; massaged = _validateAndMassagePointStructures(contour, pointAttributesFormat2, validate=validate)
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; File "/Applications/RoboFont3.3b.app/Contents/Resources/lib/python3.6/fontTools/ufoLib/glifLib.py", line 1336, in _validateAndMassagePointStructures
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; raise GlifLibError("line can not have an offcurve.")
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; fontTools.ufoLib.errors
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; .
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; GlifLibError
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; :
09/08/2019 09:43:46 &gt;   OUTPUT &gt; ROBOFONT &gt;&gt; line can not have an offcurve.
</code></pre>
]]></description><link>https://forum.robofont.com/post/2576</link><guid isPermaLink="true">https://forum.robofont.com/post/2576</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Sat, 10 Aug 2019 06:22:52 GMT</pubDate></item><item><title><![CDATA[Reply to RoboFont crashing on UFO – GlifLibError: line can not have an offcurve. on Fri, 09 Aug 2019 15:13:07 GMT]]></title><description><![CDATA[<p dir="auto">Anthrotype helped me find the issue on on the FontTools repo:</p>
<p dir="auto"><a href="https://github.com/fonttools/fonttools/issues/1688" rel="nofollow">https://github.com/fonttools/fonttools/issues/1688</a></p>
<pre><code>from fontTools.ufoLib.glifLib import GlifLibError
from defcon import Font

ufo = Font("YourFont.ufo")
for layer in ufo.layers: 
    for glyphName in layer.keys(): 
        try: 
            layer[glyphName] 
        except GlifLibError: 
            print(layer.name, glyphName)
</code></pre>
]]></description><link>https://forum.robofont.com/post/2577</link><guid isPermaLink="true">https://forum.robofont.com/post/2577</guid><dc:creator><![CDATA[StephenNixon]]></dc:creator><pubDate>Fri, 09 Aug 2019 15:13:07 GMT</pubDate></item></channel></rss>