font/sfnt: support fonts with "true" apple version tag

OpenType specification mentions that fonts might contain Apple
version tag that is equal to "true" (see note in [1]). Currently,
the library returns a parsing error for those fonts.

CL adds Apple this version tag to the validation code and allows
fonts to omit OS/2 table, as mentioned in the TrueType spec [2].

[1] https://docs.microsoft.com/en-us/typography/opentype/spec/otff#organization-of-an-opentype-font

[2] https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6OS2.html

Change-Id: I13406fe97b091f24aaabf9b477df9c8fc8df883c
Reviewed-on: https://go-review.googlesource.com/c/146078
Reviewed-by: Nigel Tao <nigeltao@golang.org>
1 file changed
tree: bc4f96703836efb4d962ebac83e6e770fd19ca1c
  1. bmp/
  2. cmd/
  3. colornames/
  4. draw/
  5. example/
  6. font/
  7. math/
  8. riff/
  9. testdata/
  10. tiff/
  11. vector/
  12. vp8/
  13. vp8l/
  14. webp/
  15. .gitattributes
  16. .gitignore
  17. AUTHORS
  18. codereview.cfg
  19. CONTRIBUTING.md
  20. CONTRIBUTORS
  21. LICENSE
  22. PATENTS
  23. README.md
README.md

Go Images

This repository holds supplementary Go image libraries.

Download/Install

The easiest way to install is to run go get -u golang.org/x/image/.... You can also manually git clone the repository to $GOPATH/src/golang.org/x/image.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the image repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/image:” in the subject line, so it is easy to find.