From b96c7d6be03e2836b350054fbe27b20e16049398 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 2 Sep 2015 11:00:02 -0400 Subject: [PATCH] Sort table names in Font definition, parse. --- truetype/truetype.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/truetype/truetype.go b/truetype/truetype.go index 05bb9cc..27484b1 100644 --- a/truetype/truetype.go +++ b/truetype/truetype.go @@ -102,7 +102,7 @@ type nr struct { type Font struct { // Tables sliced from the TTF data. The different tables are documented // at http://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html - cmap, cvt, fpgm, glyf, hdmx, head, hhea, hmtx, kern, loca, maxp, os2, prep, vmtx, name []byte + cmap, cvt, fpgm, glyf, hdmx, head, hhea, hmtx, kern, loca, maxp, name, os2, prep, vmtx []byte cmapIndexes []byte @@ -588,14 +588,14 @@ func parse(ttf []byte, offset int) (font *Font, err error) { f.loca, err = readTable(ttf, ttf[x+8:x+16]) case "maxp": f.maxp, err = readTable(ttf, ttf[x+8:x+16]) + case "name": + f.name, err = readTable(ttf, ttf[x+8:x+16]) case "OS/2": f.os2, err = readTable(ttf, ttf[x+8:x+16]) case "prep": f.prep, err = readTable(ttf, ttf[x+8:x+16]) case "vmtx": f.vmtx, err = readTable(ttf, ttf[x+8:x+16]) - case "name": - f.name, err = readTable(ttf, ttf[x+8:x+16]) } if err != nil { return