font/sfnt: add a comment about contour ordering.

Change-Id: I591c735cc1c3108aa806b0a7be6c54152fe2029e
Reviewed-on: https://go-review.googlesource.com/34174
Reviewed-by: Dave Day <djd@golang.org>
This commit is contained in:
Nigel Tao 2016-12-13 08:13:29 +11:00
parent 88b013251f
commit ed90ab82a8

View File

@ -87,8 +87,13 @@ func TestPostScript(t *testing.T) {
} }
// wants' vectors correspond 1-to-1 to what's in the CFFTest.sfd file, // wants' vectors correspond 1-to-1 to what's in the CFFTest.sfd file,
// although for some unknown reason, FontForge reverses the order somewhere // although OpenType/CFF and FontForge's SFD have reversed orders.
// along the way when converting from SFD to OpenType/CFF. // https://fontforge.github.io/validation.html says that "All paths must be
// drawn in a consistent direction. Clockwise for external paths,
// anti-clockwise for internal paths. (Actually PostScript requires the
// exact opposite, but FontForge reverses PostScript contours when it loads
// them so that everything is consistant internally -- and reverses them
// again when it saves them, of course)."
// //
// The .notdef glyph isn't explicitly in the SFD file, but for some unknown // The .notdef glyph isn't explicitly in the SFD file, but for some unknown
// reason, FontForge generates a .notdef glyph in the OpenType/CFF file. // reason, FontForge generates a .notdef glyph in the OpenType/CFF file.