commit | cd38e8056d9b27bb2f265effa37fb0ea6b8a7f0f | [log] [tgz] |
---|---|---|
author | Nigel Tao <nigeltao@golang.org> | Fri Nov 16 09:27:58 2018 +1100 |
committer | Nigel Tao <nigeltao@golang.org> | Fri Nov 16 02:48:01 2018 +0000 |
tree | 70bf39d88a68ae09a38c822d7f9fd7edc1120f3c | |
parent | dd492a22e40e40bc8e07437506d986f877029ff1 [diff] |
font/sfnt: make PostTable.ItalicAngle a float64 Previously, it was a float32, which obviously has 32 bits of state. Not all of that 32 bit state space is meaningful, since NaN has multiple bit representations. The underlying file format field (of type "Fixed" or 16.16 fixed point) is also 32 bits of state (https://docs.microsoft.com/en-us/typography/opentype/spec/post). Therefore, converting from 32 bit fixed point to 32 bit floating point can be lossy. Instead, use 64 bit floating point. 53 significand bits can losslessly represent all possible 16.16 fixed point values. Using float64 is also arguably more Go-like, as the default type for the ideal constant 0.5 is float64, not float32. Change-Id: I5abe7979a020af2ac4784d6c2723ab8e39e38e34 Reviewed-on: https://go-review.googlesource.com/c/149837 Reviewed-by: Denys Smirnov <denis.smirnov.91@gmail.com> Reviewed-by: Nigel Tao <nigeltao@golang.org>
This repository holds supplementary Go image libraries.
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
.
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.