How to use the ufonormalizer._normalizeGlifImage 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_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_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_image_no_file_name(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_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_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_image_no_transformation(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_image_no_transformation(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_image_no_file_name(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_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_image_no_color(self):
        element = ET.fromstring(
            "<img>")
        writer = XMLWriter(declaration=None)
        _normalizeGlifImage(element, writer)
        self.assertEqual(
            writer.getText(),
            '<img>')