<?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[Copying Glyph names from one UFO to other]]></title><description><![CDATA[<p dir="auto">I have 2 UFOs with the same glyph sets but with different glyph names. How do I copy the glyph names from one UFO and change the corresponding Glyph names on the other? Is there an extension for this?</p>
]]></description><link>https://forum.robofont.com/topic/1030/copying-glyph-names-from-one-ufo-to-other</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 21:13:35 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/1030.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 Apr 2022 04:18:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Copying Glyph names from one UFO to other on Fri, 22 Apr 2022 04:18:35 GMT]]></title><description><![CDATA[<p dir="auto">I have 2 UFOs with the same glyph sets but with different glyph names. How do I copy the glyph names from one UFO and change the corresponding Glyph names on the other? Is there an extension for this?</p>
]]></description><link>https://forum.robofont.com/post/4030</link><guid isPermaLink="true">https://forum.robofont.com/post/4030</guid><dc:creator><![CDATA[naorem]]></dc:creator><pubDate>Fri, 22 Apr 2022 04:18:35 GMT</pubDate></item><item><title><![CDATA[Reply to Copying Glyph names from one UFO to other on Fri, 22 Apr 2022 09:37:26 GMT]]></title><description><![CDATA[<p dir="auto">How do you want to "identify" the same glyph with different naming? by unicode?</p>
<p dir="auto">I guess the easiest todo is to set up a map of glyph names to change...</p>
<pre><code class="language-python"># map the old name to a new name
glyphNameRenameMap = {
    "a": "a.new",
    "b": "b.new",
}

# get the current font
font = CurrentFont()
# start loop over all glyph names to rename
for oldName, newName in glyphNameRenameMap.items():
    font.renameGlyph(oldName, newName, renameComponents=True, renameGroups=True, renameKerning=True)
</code></pre>
]]></description><link>https://forum.robofont.com/post/4031</link><guid isPermaLink="true">https://forum.robofont.com/post/4031</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 22 Apr 2022 09:37:26 GMT</pubDate></item><item><title><![CDATA[Reply to Copying Glyph names from one UFO to other on Fri, 22 Apr 2022 09:54:52 GMT]]></title><description><![CDATA[<p dir="auto">If your glyph sets are identical, and the corresponding glyphs have the same index, you could work with this script.</p>
<p dir="auto">This script expects two UFOs. The CurrentFont is your source font (has the glyph name you want), the other font is your target font (where you want to change the glyph names).</p>
<pre><code># Copy glyph names from current font to other font based on index only

srcFont = CurrentFont()
fonts = AllFonts()

# Open 2 UFOs
if len(fonts) == 2:
    # Source font (srcFont) is current font
    # Target font (trgtFont) is other font
    for f in fonts:
        if f != srcFont:
            trgtFont = f

    # collecting old and new names of glyphs from
    # srcFont and trgtFont using the index of the glyph order.
    oldNameToNewName = {}
    for gNameNew in srcFont.glyphOrder:
        gNameNewIndex = srcFont.glyphOrder.index(gNameNew)
        gNameOld = trgtFont.glyphOrder[gNameNewIndex]
        # If name of glyph in srcFont and trgtFont with the same index are 
        # not the same store their names in the dictionary oldNameToNewName
        if gNameOld != gNameNew:
            oldNameToNewName[gNameNew] = gNameOld
    for newName, oldName in oldNameToNewName.items():
        print("# changing: "+oldName+" → "+newName)
        trgtFont.renameGlyph(oldName, newName, renameComponents=True, renameGroups=True, renameKerning=True)
else:
    print("# Open two UFOs")
</code></pre>
]]></description><link>https://forum.robofont.com/post/4032</link><guid isPermaLink="true">https://forum.robofont.com/post/4032</guid><dc:creator><![CDATA[martin]]></dc:creator><pubDate>Fri, 22 Apr 2022 09:54:52 GMT</pubDate></item><item><title><![CDATA[Reply to Copying Glyph names from one UFO to other on Tue, 26 Apr 2022 03:46:15 GMT]]></title><description><![CDATA[<p dir="auto">Thank you <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/27">@Martin</a></p>
]]></description><link>https://forum.robofont.com/post/4037</link><guid isPermaLink="true">https://forum.robofont.com/post/4037</guid><dc:creator><![CDATA[naorem]]></dc:creator><pubDate>Tue, 26 Apr 2022 03:46:15 GMT</pubDate></item></channel></rss>