Skip to content

Instantly share code, notes, and snippets.

@borodean
Created April 5, 2015 15:16
Show Gist options
  • Select an option

  • Save borodean/0eff2fdd969e7657a3d5 to your computer and use it in GitHub Desktop.

Select an option

Save borodean/0eff2fdd969e7657a3d5 to your computer and use it in GitHub Desktop.
FontForge Ruble Extraction
# Usage:
# fontforge -lang=py -script script.py
import fontforge
source = fontforge.open('rouble.otf')
source.selection.select(('ranges', None), 'a')
source.copy()
font = fontforge.font()
font.encoding = 'UnicodeFull'
font.design_size = source.design_size
font.em = source.em
font.ascent = source.ascent
font.descent = source.descent
font.copyright = source.copyright
font.selection.select(('ranges', None), 0x20bd)
font.paste()
font.fontname = 'ArialRuble'
font.familyname = 'Arial Ruble'
font.fullname = 'Arial Ruble'
font.generate('build/ArialRuble.svg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment