Generate/Compile only in otf

RoboFont Forums Help / General Generate/Compile only in otf

This topic contains 6 replies, has 2 voices, and was last updated by  Thom 1 year, 11 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5387

    Thom
    Participant

    Hello,

    Is there a way to put only a given charset in the otf?
    Ben benieuwd!

    Thom

    #5388

    Thom
    Participant

    O! the title should be: Generate/Compile /less yourCharset/greater only in otf

    #5390

    frederik
    Keymaster

    not atomically, mainly cause you have to deal with all the OT features (like kerning)

    #5392

    Thom
    Participant

    I see. So it makes more sense to make more ufo’s if you want specific charsets for your fonts?

    #5393

    frederik
    Keymaster

    no, do this on the fly, make a script that extract only the glyph you need from a master UFO

    #5394

    Thom
    Participant

    Okay! Can you give a tiny example of the script? Thanks!

    #5395

    Thom
    Participant

    Like so?

    familyName = ‘Fam’
    styleName = ‘Style’
    Latin1=[‘space’, ‘exclam’, ‘quotesingle’, ‘quotedbl’, ‘numbersign’, ‘dollar’, ‘percent’, ‘ampersand’, ‘parenleft’, ‘parenright’, ‘asterisk’, ‘plus’, ‘comma’, ‘hyphen’, ‘period’, ‘slash’, ‘zero’, ‘one’, ‘two’, ‘three’, ‘four’, ‘five’, ‘six’, ‘seven’, ‘eight’, ‘nine’, ‘colon’, ‘semicolon’, ‘less’, ‘equal’, ‘greater’, ‘question’, ‘at’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, ‘H’, ‘I’, ‘J’, ‘K’, ‘L’, ‘M’, ‘N’, ‘O’, ‘P’, ‘Q’, ‘R’, ‘S’, ‘T’, ‘U’, ‘V’, ‘W’, ‘X’, ‘Y’, ‘Z’, ‘bracketleft’, ‘backslash’, ‘bracketright’, ‘asciicircum’, ‘underscore’, ‘grave’, ‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘o’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘u’, ‘v’, ‘w’, ‘x’, ‘y’, ‘z’, ‘braceleft’, ‘bar’, ‘braceright’, ‘asciitilde’, ‘exclamdown’, ‘cent’, ‘sterling’, ‘currency’, ‘yen’, ‘brokenbar’, ‘section’, ‘dieresis’, ‘copyright’, ‘ordfeminine’, ‘guillemotleft’, ‘logicalnot’, ‘registered’, ‘macron’, ‘degree’, ‘plusminus’, ‘twosuperior’, ‘threesuperior’, ‘acute’, ‘mu’, ‘paragraph’, ‘periodcentered’, ‘cedilla’, ‘onesuperior’, ‘ordmasculine’, ‘guillemotright’, ‘onequarter’, ‘onehalf’, ‘threequarters’, ‘questiondown’, ‘Agrave’, ‘Aacute’, ‘Acircumflex’, ‘Atilde’, ‘Adieresis’, ‘Aring’, ‘AE’, ‘Ccedilla’, ‘Egrave’, ‘Eacute’, ‘Ecircumflex’, ‘Edieresis’, ‘Igrave’, ‘Iacute’, ‘Icircumflex’, ‘Idieresis’, ‘Eth’, ‘Ntilde’, ‘Ograve’, ‘Oacute’, ‘Ocircumflex’, ‘Otilde’, ‘Odieresis’, ‘multiply’, ‘Oslash’, ‘Ugrave’, ‘Uacute’, ‘Ucircumflex’, ‘Udieresis’, ‘Yacute’, ‘Thorn’, ‘germandbls’, ‘agrave’, ‘aacute’, ‘acircumflex’, ‘atilde’, ‘adieresis’, ‘aring’, ‘ae’, ‘ccedilla’, ‘egrave’, ‘eacute’, ‘ecircumflex’, ‘edieresis’, ‘igrave’, ‘iacute’, ‘icircumflex’, ‘idieresis’, ‘eth’, ‘ntilde’, ‘ograve’, ‘oacute’, ‘ocircumflex’, ‘otilde’, ‘odieresis’, ‘divide’, ‘oslash’, ‘ugrave’, ‘uacute’, ‘ucircumflex’, ‘udieresis’, ‘yacute’, ‘thorn’, ‘ydieresis’, ‘dotlessi’, ‘circumflex’, ‘caron’, ‘breve’, ‘dotaccent’, ‘ring’, ‘ogonek’, ’tilde’, ‘hungarumlaut’, ‘quoteleft’, ‘quoteright’, ‘minus’]

    newFont = NewFont(familyName=familyName, styleName=styleName, showUI=True)

    master = RFont(‘/path/to/your.ufo’, showUI=False)

    for newGlyph in Latin1:
    exGlyph = master[newGlyph]
    newFont[newGlyph] = exGlyph

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.