github.com/signintech/pdft@v0.5.0/minigopdf/fontmaker/core/kern_table.go (about) 1 package core 2 3 // KernTable https://www.microsoft.com/typography/otspec/kern.htm 4 type KernTable struct { 5 Version uint //for debug 6 NTables uint //for debug 7 Kerning KernMap 8 } 9 10 // KernMap kerning map map[left]KernValue 11 type KernMap map[uint]KernValue 12 13 // KernValue kerning values map[right]value 14 type KernValue map[uint]int16 15 16 // ValueByRight get value by right 17 func (k KernValue) ValueByRight(right uint) (bool, int16) { 18 if val, ok := k[uint(right)]; ok { 19 return true, val 20 } 21 return false, 0 22 }