Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(451)

Issue 14092044: code review 14092044: freetype/truetype: fix rounding for negative numbers to... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by nigeltao
Modified:
11 years, 1 month ago
Reviewers:
bsiegert
CC:
bsiegert, golang-dev
Visibility:
Public.

Description

freetype/truetype: fix rounding for negative numbers to match the C Freetype implementation. The spec is the "Order of rounding operations" part of https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding but it wasn't exactly clear to me what "the negative round value closest to zero" was: if the phase is 1/4, was that value -1/4 or -3/4? Anyway, the Go code now follows the C code, and code trumps documentation.

Patch Set 1 #

Patch Set 2 : diff -r 3ebd703fd260 https://code.google.com/p/freetype-go #

Patch Set 3 : diff -r 3ebd703fd260 https://code.google.com/p/freetype-go #

Patch Set 4 : diff -r 3ebd703fd260 https://code.google.com/p/freetype-go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -33 lines) Patch
M freetype/truetype/hint.go View 1 1 chunk +10 lines, -16 lines 0 comments Download
M freetype/truetype/hint_test.go View 1 1 chunk +16 lines, -16 lines 0 comments Download
M freetype/truetype/truetype_test.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
nigeltao
Hello bsiegert@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/freetype-go
11 years, 1 month ago (2013-09-29 05:28:28 UTC) #1
bsiegert
LGTM
11 years, 1 month ago (2013-09-29 07:11:17 UTC) #2
nigeltao
11 years, 1 month ago (2013-09-29 08:31:07 UTC) #3
*** Submitted as
https://code.google.com/p/freetype-go/source/detail?r=87f6a75e5c5a ***

freetype/truetype: fix rounding for negative numbers to match the C
Freetype implementation.

The spec is the "Order of rounding operations" part of
https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding
but it wasn't exactly clear to me what "the negative round value
closest to zero" was: if the phase is 1/4, was that value -1/4 or
-3/4? Anyway, the Go code now follows the C code, and code trumps
documentation.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14092044
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b