Example #1
0
def _stripGlyphXMLTree(nodes):
	for element, attrs, children in nodes:
		# "lib" is formatted as a plist, so we need unstripped
		# character data so we can support strings with leading or
		# trailing whitespace. Do strip everything else.
		recursive = (element != "lib")
		stripCharacterData(children, recursive=recursive)
Example #2
0
def _stripGlyphXMLTree(nodes):
	for element, attrs, children in nodes:
		# "lib" is formatted as a plist, so we need unstripped
		# character data so we can support strings with leading or
		# trailing whitespace. Do strip everything else.
		recursive = (element != "lib")
		stripCharacterData(children, recursive=recursive)
Example #3
0
def _glifTreeFromFile(aFile):
	try:
		tree = buildTree(aFile, stripData=False)
		stripCharacterData(tree[2], recursive=False)
		assert tree[0] == "glyph"
		_stripGlyphXMLTree(tree[2])
		return tree
	except:
		print "Problem with glif file", aFile
		raise
	return None
Example #4
0
def _glifTreeFromFile(aFile):
	try:
		tree = buildTree(aFile, stripData=False)
		stripCharacterData(tree[2], recursive=False)
		assert tree[0] == "glyph"
		_stripGlyphXMLTree(tree[2])
		return tree
	except:
		print "Problem with glif file", aFile
		raise
	return None
Example #5
0
def _glifTreeFromFile(aFile):
    tree = buildTree(aFile, stripData=False)
    stripCharacterData(tree[2], recursive=False)
    assert tree[0] == "glyph"
    _stripGlyphXMLTree(tree[2])
    return tree
Example #6
0
def _glifTreeFromFile(aFile):
	tree = buildTree(aFile, stripData=False)
	stripCharacterData(tree[2], recursive=False)
	assert tree[0] == "glyph"
	_stripGlyphXMLTree(tree[2])
	return tree