From ff2b91c280717fa78b46dec4135016407eade765 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Tue, 8 Sep 2015 20:33:00 -0400 Subject: [PATCH] Move cmap consts to parseCmap. --- truetype/truetype.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/truetype/truetype.go b/truetype/truetype.go index 7c6137c..f0ce671 100644 --- a/truetype/truetype.go +++ b/truetype/truetype.go @@ -52,10 +52,6 @@ const ( ) const ( - cmapFormat4 = 4 - cmapFormat12 = 12 - languageIndependent = 0 - // A 32-bit encoding consists of a most-significant 16-bit Platform ID and a // least-significant 16-bit Platform Specific ID. The magic numbers are // specified at https://www.microsoft.com/typography/otspec/name.htm @@ -230,6 +226,12 @@ type Font struct { } func (f *Font) parseCmap() error { + const ( + cmapFormat4 = 4 + cmapFormat12 = 12 + languageIndependent = 0 + ) + offset, _, _, err := parseSubtables(f.cmap, "cmap", 4, 8, 4, 0, []int{}, []int{}, false) if err != nil { return err