From 983c21c745e97f97f020d5c3af8326efd26903ba Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 7 Dec 2015 11:07:56 +0000 Subject: [PATCH] [V_D_M_X_] sort records by yPelHeight when writing toXML --- Lib/fontTools/ttLib/tables/V_D_M_X_.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/fontTools/ttLib/tables/V_D_M_X_.py b/Lib/fontTools/ttLib/tables/V_D_M_X_.py index e680cbd52..abca3bf1d 100644 --- a/Lib/fontTools/ttLib/tables/V_D_M_X_.py +++ b/Lib/fontTools/ttLib/tables/V_D_M_X_.py @@ -176,10 +176,10 @@ class table_V_D_M_X_(DefaultTable.DefaultTable): writer.comment("recs=%d, startsz=%d, endsz=%d" % (recs, startsz, endsz)) writer.newline() - for yPelHeight in group.keys(): - yMax, yMin = group[yPelHeight] + for yPelHeight, (yMax, yMin) in sorted(group.items()): writer.simpletag( - "record", yPelHeight=yPelHeight, yMax=yMax, yMin=yMin) + "record", + [('yPelHeight', yPelHeight), ('yMax', yMax), ('yMin', yMin)]) writer.newline() writer.endtag("group") writer.newline()