<?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[Strings into Names]]></title><description><![CDATA[<p dir="auto">Hi, I'm working on extension that will perform some operations on strings.</p>
<p dir="auto">My question is:<br />
Is there any way to translate python string object into list of nice names, that later I could use for calling glyphs with those names (with <code>CurrentFont()['name']</code>)?</p>
<p dir="auto">Thanks in advance for your help :)</p>
]]></description><link>https://forum.robofont.com/topic/447/strings-into-names</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 12:20:14 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/447.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Jan 2018 22:48:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Strings into Names on Sun, 21 Jan 2018 16:06:43 GMT]]></title><description><![CDATA[<p dir="auto">Hi, I'm working on extension that will perform some operations on strings.</p>
<p dir="auto">My question is:<br />
Is there any way to translate python string object into list of nice names, that later I could use for calling glyphs with those names (with <code>CurrentFont()['name']</code>)?</p>
<p dir="auto">Thanks in advance for your help :)</p>
]]></description><link>https://forum.robofont.com/post/1486</link><guid isPermaLink="true">https://forum.robofont.com/post/1486</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Sun, 21 Jan 2018 16:06:43 GMT</pubDate></item><item><title><![CDATA[Reply to Strings into Names on Sun, 21 Jan 2018 18:22:51 GMT]]></title><description><![CDATA[<p dir="auto">hi Rafał,</p>
<p dir="auto">if I understand it correctly, you wish to convert a unicode string into PostScript names?</p>
<p dir="auto">if so, try this out:</p>
<pre><code class="language-python">from fontTools.agl import UV2AGL

myText = "héllø"
myText = myText.decode("utf-8")

f = CurrentFont()

for char in myText:
    uni = ord(char)
    glyphName = UV2AGL.get(uni)
    if glyphName and glyphName in f:
        print f[glyphName]
</code></pre>
<p dir="auto">based on <a href="http://gist.github.com/typemytype/487d24ede79bc0ec2e36#file-stringtoglyphnames-py" rel="nofollow">this example</a></p>
<p dir="auto">let us know if it works!</p>
]]></description><link>https://forum.robofont.com/post/1487</link><guid isPermaLink="true">https://forum.robofont.com/post/1487</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Sun, 21 Jan 2018 18:22:51 GMT</pubDate></item><item><title><![CDATA[Reply to Strings into Names on Sun, 21 Jan 2018 18:36:51 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!<br />
Works perfectly!</p>
]]></description><link>https://forum.robofont.com/post/1488</link><guid isPermaLink="true">https://forum.robofont.com/post/1488</guid><dc:creator><![CDATA[RafaŁ Buchner]]></dc:creator><pubDate>Sun, 21 Jan 2018 18:36:51 GMT</pubDate></item></channel></rss>