How to use the ufonormalizer.XMLWriter function in ufonormalizer

To help you get started, we’ve selected a few ufonormalizer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_image_everything(self):
        element = ET.fromstring(
            "<img color="1,0,0,.5">")
        writer = XMLWriter(declaration=None)
        _normalizeGlifImage(element, writer)
        self.assertEqual(
            writer.getText(),
            '<img color="1,0,0,0.5">')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_guideline_everything(self):
        element = ET.fromstring(
            "")
        writer = XMLWriter(declaration=None)
        _normalizeGlifGuideline(element, writer)
        self.assertEqual(
            writer.getText(),
            '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_advance_width(self):
        element = ET.fromstring('')
        writer = XMLWriter(declaration=None)
        _normalizeGlifAdvance(element, writer)
        self.assertEqual(writer.getText(), '')

        element = ET.fromstring('')
        writer = XMLWriter(declaration=None)
        _normalizeGlifAdvance(element, writer)
        self.assertEqual(writer.getText(), '')

        element = ET.fromstring('')
        writer = XMLWriter(declaration=None)
        _normalizeGlifAdvance(element, writer)
        self.assertEqual(writer.getText(), '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_advance_height(self):
        element = ET.fromstring('')
        writer = XMLWriter(declaration=None)
        _normalizeGlifAdvance(element, writer)
        self.assertEqual(writer.getText(), '')

        element = ET.fromstring('')
        writer = XMLWriter(declaration=None)
        _normalizeGlifAdvance(element, writer)
        self.assertEqual(writer.getText(), '')

        element = ET.fromstring('')
        writer = XMLWriter(declaration=None)
        _normalizeGlifAdvance(element, writer)
        self.assertEqual(writer.getText(), '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_image_empty(self):
        element = ET.fromstring("<img>")
        writer = XMLWriter(declaration=None)
        _normalizeGlifImage(element, writer)
        self.assertEqual(writer.getText(), '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_anchor_no_y(self):
        element = ET.fromstring(
            "")
        writer = XMLWriter(declaration=None)
        _normalizeGlifAnchor(element, writer)
        self.assertEqual(writer.getText(), '')

        element = ET.fromstring(
            "")
        writer = XMLWriter(declaration=None)
        _normalizeGlifAnchor(element, writer)
        self.assertEqual(writer.getText(), '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_outline_format1_empty(self):
        outline = ""
        element = ET.fromstring(outline)
        writer = XMLWriter(declaration=None)
        _normalizeGlifOutlineFormat1(element, writer)
        self.assertEqual(writer.getText(), '')

        outline = "\n"
        element = ET.fromstring(outline)
        writer = XMLWriter(declaration=None)
        _normalizeGlifOutlineFormat1(element, writer)
        self.assertEqual(writer.getText(), '')

        outline = "\n\t\n\t\n"
        element = ET.fromstring(outline)
        writer = XMLWriter(declaration=None)
        _normalizeGlifOutlineFormat1(element, writer)
        self.assertEqual(writer.getText(), '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_image_no_color(self):
        element = ET.fromstring(
            "<img>")
        writer = XMLWriter(declaration=None)
        _normalizeGlifImage(element, writer)
        self.assertEqual(
            writer.getText(),
            '<img>')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeGLIF_anchor_everything(self):
        element = ET.fromstring(
            "")
        writer = XMLWriter(declaration=None)
        _normalizeGlifAnchor(element, writer)
        self.assertEqual(
            writer.getText(),
            '')
github unified-font-object / ufoNormalizer / tests / test_ufonormalizer.py View on Github external
def test_normalizeFontInfoPlist_guidelines_horizontal_x_is_zero(self):
        # Actually an horizontal guide
        element = ET.fromstring("")
        writer = XMLWriter(declaration=None)
        _normalizeGlifGuideline(element, writer)
        self.assertEqual(writer.getText(), '')