Skip to content

Instantly share code, notes, and snippets.

@arialcrime
Created November 14, 2018 09:17
Show Gist options
  • Select an option

  • Save arialcrime/cbc9b25aff6d66120577f9d851d7c75e to your computer and use it in GitHub Desktop.

Select an option

Save arialcrime/cbc9b25aff6d66120577f9d851d7c75e to your computer and use it in GitHub Desktop.
# in the current font
# add lowercase unicodes to uppercase characters
# requires compositor for mapping uppercase to lowercase, https://github.com/typesupply/compositor
from compositor.caseConversionMaps import upperToSingleLower
f = CurrentFont()
for g in f:
for u in g.unicodes:
if u in upperToSingleLower:
lcu = upperToSingleLower[u]
if lcu not in g.unicodes:
g.unicodes += (lcu,)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment