diff options
author | Kurt <kurt.w.jung@gmail.com> | 2019-09-25 08:16:44 -0400 |
---|---|---|
committer | Kurt <kurt.w.jung@gmail.com> | 2019-09-25 08:16:44 -0400 |
commit | cae7d4739e815a170819d84c5361b05306b2f019 (patch) | |
tree | 94aeb9ae213fdea7f01dc7fcd6c6423865203d1a /util.go | |
parent | 07f2797b1523f4a406a919883c018ca52233a8a0 (diff) |
Merge from v2: Escape spaces in font family string to comply with PDF standard
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -452,3 +452,11 @@ func isChinese(rune2 rune) bool { } return false } + +// Condition font family string to PDF name compliance. See section 5.3 (Names) +// in https://resources.infosecinstitute.com/pdf-file-format-basic-structure/ +func fontFamilyEscape(familyStr string) (escStr string) { + escStr = strings.ReplaceAll(familyStr, " ", "#20") + // Additional replacements can take place here + return +} |