From 7aa42990f0139dda292283084f5036ef86d3587c Mon Sep 17 00:00:00 2001 From: moyogo Date: Thu, 21 Jan 2016 14:03:54 +0000 Subject: [PATCH] [voltLib] parser_test.py: add test for locked anchor --- Lib/fontTools/voltLib/parser_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Lib/fontTools/voltLib/parser_test.py b/Lib/fontTools/voltLib/parser_test.py index 666ace4f5..42ee3cb0d 100644 --- a/Lib/fontTools/voltLib/parser_test.py +++ b/Lib/fontTools/voltLib/parser_test.py @@ -749,6 +749,18 @@ class ParserTest(unittest.TestCase): 'COMPONENT 1 AT POS DX 250 DY 450 END_POS END_ANCHOR\n' ) + def test_def_anchor_locked(self): + [anchor] = self.parse( + 'DEF_ANCHOR "top" ON 120 GLYPH a ' + 'COMPONENT 1 LOCKED AT POS DX 250 DY 450 END_POS END_ANCHOR\n' + ).statements + self.assertEqual( + (anchor.name, anchor.gid, anchor.glyph_name, anchor.component, + anchor.locked, anchor.pos), + ("top", 120, "a", 1, + True, (None, 250, 450, {}, {}, {})) + ) + def test_anchor_adjust_device(self): [anchor] = self.parse( 'DEF_ANCHOR "MARK_top" ON 123 GLYPH diacglyph '