Add multi new Tags

Is there a way to create more than one Tag at a time, or to import them as a TXT file, for example?

To clarify my question: is there any official way in MainType to create multiple tags at once, rather than adding them individually in the Tag Manager?

For example, can tag definitions be imported from a TXT, CSV, XML, or similar file, created through a command-line option, an API or scripting interface, or by any other documented bulk-import method?

I am specifically asking about creating the tags themselves, not assigning existing tags to fonts.

No, this is not possible right now.

Do you intend to add a lot of tags?

Hi Erwin,

Thank you very much for checking in. Yes, I’m rebuilding my font tagging system. To do that, I’d like to start by creating all the new tags. There are a lot of them. It would be great if there were a workaround to speed up, simplify, or automate the process.

There might be a way to do this, although I haven’t tested it myself.

You could try the following:

  1. Add a tag to any random font and name it Placeholder.
  2. Export the Font Tags via Tools > Import and Export.
  3. Open the exported file in a text editor.
  4. Search for Placeholder.

You should find something like this:

<FontItem>
  <UID>006A3A20-0002E9F4-62682E33-0000</UID>
  <Note></Note>
  <Rating>0</Rating>
  <Tags>Placeholder</Tags>
</FontItem>

Replace Placeholder with a comma-separated list of all the tags you want to add.

  1. Then save the file and use MainType’s Import feature to import it again.

I haven’t verified this method, so I would recommend making a backup first and using it at your own risk.

1 Like

Thank you for the suggestion. I tested it further, and the result is actually more promising than I first thought.

I used a backup and then tested the following:

  • I exported the font tag data.
  • In the XML, I added several previously unknown tag names to several different fonts.
  • One of those fonts had no tag at all before the test.
  • I also used one tag (TEST_TRIGGER_SHARED) on several different fonts.

After importing the modified XML, the new tag assignments were already present internally, but the new tag definitions were not yet fully visible in the UI.

Then I opened the Tag Manager and created one completely unrelated new tag which was not used in the XML.

Immediately after that, all previously unknown tags from the imported XML appeared automatically, and all assignments were correct:

  • font-specific tags appeared on the intended fonts;
  • the shared tag appeared on all intended fonts;
  • the previously completely untagged font also received its imported tags correctly.

So it seems that the XML import can already store assignments to unknown tags. Creating any new tag in the Tag Manager afterwards appears to trigger a refresh/materialization of all pending tag definitions.

In other words, your suggested method works, with one additional step: after importing the modified XML, creating a single new tag in the Tag Manager seems to make all imported new tags available at once.

I hope this is useful.

If there is a documented way to trigger the same refresh/materialization programmatically, that would make bulk tag creation via XML especially practical.

1 Like