Esempio n. 1
0
def test_font_load():
    font = glyphs.load("tests/data/Test1.glyphs")
    assert isinstance(font, Font)
    assert isinstance(font.defaultLayer, Layer)
    assert (font.defaultLayer.keys() == {
        "A": 1,
        "B": 1,
        "i": 1,
        "idotless": 1,
        "dotaccentcomb": 1
    }.keys())
    assert "AllLetters" in font.groups
    assert font.glyphForCodepoint(ord("A")) == "A"
Esempio n. 2
0
def test_segments():
    font = glyphs.load("tests/data/Test1.glyphs")
    segments = font["B"].contours[0].segments
    assert len(segments) == 7
Esempio n. 3
0
def test_clone_glyph():
    font = glyphs.load("tests/data/Test1.glyphs")
    font["B"].copy()