golang-image/font/sfnt
Denys Smirnov 2a2258ff36 font/sfnt: support parsing legacy fonts with OS2 table version <= 1
Library assumes that OS/2 header size is at least 96 bytes,
which is not the case for fonts with OS/2 table version <= 1.

This CL adds a version test and handles the legacy header.

Fixes golang/go#28339

Change-Id: I79bd8f8bbf262c1caaf4e66888446159b5e4fb43
Reviewed-on: https://go-review.googlesource.com/c/144079
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-10-25 23:34:08 +00:00
..
cmap.go font/sfnt: use charmap EncodeRune API. 2017-04-05 22:33:02 +00:00
data.go font/sfnt: implement Font.GlyphName. 2017-02-17 10:37:04 +00:00
example_test.go font/sfnt: explicitly close glyph contours. 2017-04-10 07:42:48 +00:00
gen.go font/sfnt: implement Font.GlyphName. 2017-02-17 10:37:04 +00:00
postscript.go font/sfnt: implement hflex and hflex1. 2017-05-23 02:19:15 +00:00
proprietary_test.go font/sfnt: implement hflex and hflex1. 2017-05-23 02:19:15 +00:00
sfnt_test.go image/font: expose caret slope 2018-09-26 01:56:37 +00:00
sfnt.go font/sfnt: support parsing legacy fonts with OS2 table version <= 1 2018-10-25 23:34:08 +00:00
truetype.go font/sfnt: implement Font.GlyphAdvance. 2017-04-05 22:26:46 +00:00