Example #1
0
def SelectGlyph(font, message="Select a glyph:", title='RoboFab'):
	"""
	Returns glyph instance if there is one, otherwise it returns None.
	Availability: FontLab
	"""
	from fontTools.misc.textTools import caselessSort

	if inFontLab:
		tl = font.keys()
		list = caselessSort(tl)
		glyphname = OneList(list, message, title)
		if glyphname is None:
			return None
		else:
			return font[glyphname]
	else:
		_raisePlatformError('SelectGlyph')
Example #2
0
def SelectGlyph(font, message="Select a glyph:", title='RoboFab'):
    """
	Returns glyph instance if there is one, otherwise it returns None.
	Availability: FontLab
	"""
    from fontTools.misc.textTools import caselessSort

    if inFontLab:
        tl = font.keys()
        list = caselessSort(tl)
        glyphname = OneList(list, message, title)
        if glyphname is None:
            return None
        else:
            return font[glyphname]
    else:
        _raisePlatformError('SelectGlyph')
Example #3
0
	def getGlyphNames2(self):
		"""Get a list of glyph names, sorted alphabetically,
		but not case sensitive.
		"""
		from fontTools.misc import textTools
		return textTools.caselessSort(self.getGlyphOrder())
Example #4
0
	def getGlyphNames2(self):
		"""Get a list of glyph names, sorted alphabetically,
		but not case sensitive.
		"""
		from fontTools.misc import textTools
		return textTools.caselessSort(self.getGlyphOrder())