~sbinet/star-tex

f05951c8ec1b7f21ef55a98b925fed8c0a477913 — Sebastien Binet 19 days ago 723afee main
font/fixed: fix float64 to uint32 conversion failing on linux/arm

Contribution from ~cznic at:

https://gitlab.com/cznic/knuth/-/commit/ae0b147fc8ba5da8093ad4b136b0f3a51409ff61

Signed-off-by: Sebastien Binet <s@sbinet.org>
2 files changed, 2 insertions(+), 2 deletions(-)

M font/fixed/int12_20.go
M font/fixed/int16_16.go
M font/fixed/int12_20.go => font/fixed/int12_20.go +1 -1
@@ 30,7 30,7 @@ func ParseInt12_20(s string) (Int12_20, error) {
	if err != nil {
		return 0, err
	}
	return Int12_20(f * (1 << 20)), nil
	return Int12_20(int32(f * (1 << 20))), nil
}

// Float64 converts the 12.20 fixed-point number to a floating point one.

M font/fixed/int16_16.go => font/fixed/int16_16.go +1 -1
@@ 28,7 28,7 @@ func ParseInt16_16(s string) (Int16_16, error) {
	if err != nil {
		return 0, err
	}
	return Int16_16(f * (1 << 16)), nil
	return Int16_16(int32(f * (1 << 16))), nil
}

func (x Int16_16) Float64() float64 {