new comment
This commit is contained in:
parent
dedf9e2d55
commit
73cd05f9e9
1 changed files with 2 additions and 1 deletions
|
|
@ -369,7 +369,8 @@ func (utf *utf8FontFile) generateCMAPTable(cidSymbolPairCollection map[int]int,
|
|||
cmap = append(cmap, 0)
|
||||
|
||||
// Calculating cmap length based off of fpdf https://github.com/Setasign/FPDF/blob/f4104a04c9a3f95c4c26a0a0531abebcc980987a/makefont/ttfparser.php#L476
|
||||
data = append(data, 6+len(cmap)*2, 0) // [version, numTables, platformID, encodingID, offset, format], length, language
|
||||
length := (3 + len(cmap)) * 2 // the 3 extra bytes are for encodingID, offset, format, which are part of the cmap length
|
||||
data = append(data, length, 0) // [version, numTables, platformID, encodingID, offset, format], length, language
|
||||
data = append(data, cmap...)
|
||||
|
||||
cmapstr := make([]byte, 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue