Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 5
0
def _glifTreeFromFile(aFile):
    tree = buildTree(aFile, stripData=False)
    stripCharacterData(tree[2], recursive=False)
    assert tree[0] == "glyph"
    _stripGlyphXMLTree(tree[2])
    return tree
Exemplo n.º 6
0
def _glifTreeFromFile(aFile):
	tree = buildTree(aFile, stripData=False)
	stripCharacterData(tree[2], recursive=False)
	assert tree[0] == "glyph"
	_stripGlyphXMLTree(tree[2])
	return tree