adobe-type-tools/opentype-svg

Feature request: One folder for all outputs

davidgodzsak opened this issue · 2 comments

It would be nice to have a flag to save all the svg files to the same output folder instead of adding the nested folder.

Using the letter describing the glyph is impossible as some operating sysems are case insensitive: a.svg and A.svg are the same.

I have 2 possible suggestions:

  1. postfix the letter name with the character code (e.g. with unicode it would be something like this A_U0041.svg, a_U0061.svg) automatically (CMAP could be used for this)
  2. pre or postfix the letters that are not unique if lowercased (e.g. --prefix-non-uinque lower_ would produce lower_a.svg)

I like the idea.

Option 1 won't work because not all glyphs are encoded; a font with a.alt and A.alt glyphs would fail.

I think we could just use FontTools' userNameToFileName method, which essentially adds an _ (underscore) after each capital letter.

I will make a PR next weekend