gString

A bunch of stuff useful for glyph name comparisons and such.

  1. A group of sorted glyph name lists that can be called directly:
  2. Some tools to work with glyph names to do things like build control strings.
robofab.gString.breakSuffix(glyphname)

Breaks the glyphname into a two item list 0: glyphname 1: suffix

if a suffix is not found it returns None

robofab.gString.findAccentBase(accentglyph)

Return the base glyph of an accented glyph for example: Ugrave.sc returns U.sc

robofab.gString.splitAccent(accentglyph)

Split an accented glyph into a two items 0: base glyph 1: accent list

for example: Yacute.scalt45 returns: (Y.scalt45, [acute]) and: aacutetilde.alt45 returns (a.alt45, [acute, tilde])

robofab.gString.upper(glyphstring)

Convert all possible characters to uppercase in a glyph string.

robofab.gString.lower(glyphstring)

Convert all possible characters to lowercase in a glyph string.

robofab.gString.small(glyphstring)

Convert all possible characters to smallcaps in a glyph string.

robofab.gString.controls(glyphname)

Send this a glyph name and get a control string with all glyphs separated by slashes.

robofab.gString.sortControlList(list)

Roughly sort a list of control strings.

robofab.gString.kernControls(leftglyphname, rightglyphname)

build a control string based on the left glyph and right glyph