path: root/scripts/lib/fontbuild/
diff options
authorJames Godfrey-Kittle <>2015-07-17 14:00:15 -0700
committerJames Godfrey-Kittle <>2015-07-17 14:00:15 -0700
commit374cdb9618876e78418956be3688ce635d03083c (patch)
tree0b9594f24dcc1ffd0e6cbba34155a51ad444571d /scripts/lib/fontbuild/
parent63121378f3205be133a08804d5fdce23c3f6198d (diff)
Explicitly check anchor objects against None.
This is necessary because of some implementation details in RoboFab; RAnchor objects always evaluate to False in a boolean context. Fixes a bug in which "top" anchors were not being added to composite glyphs, since they are added only when the "parenttop" anchor is present (which was checked for with a statement like "if anchor:").
Diffstat (limited to 'scripts/lib/fontbuild/')
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/fontbuild/ b/scripts/lib/fontbuild/
index d7e49d8..5f60683 100644
--- a/scripts/lib/fontbuild/
+++ b/scripts/lib/fontbuild/
@@ -91,7 +91,7 @@ def copyMarkAnchors(f, g, srcname, width):
anchor_parent_top = anchor
- if anchor_parent_top:
+ if anchor_parent_top is not None:
g.appendAnchor("top", anchor_parent_top.position)