Commit Graph

11 Commits

Author SHA1 Message Date
Nigel Tao b968fb0953 freeetype: move the test fonts from the luxi-fonts/ directory to
testdata/, in anticipation of having other test data.

R=dsymonds
CC=bsiegert, golang-dev
https://codereview.appspot.com/14361044
2013-10-04 17:03:59 +10:00
Nigel Tao 0ec7c0ecae freetype/truetype: fix IUP rounding for negative numbers.
We now match Freetype C exactly for hinting luxisr.ttf. Yay.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14336044
2013-10-04 08:30:53 +10:00
Nigel Tao 7e90529703 freetype/truetype: fix the SSW instruction to scale the single-width
value and the MDRP instruction's use of the single-width value.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14273043
2013-10-03 21:32:43 +10:00
Nigel Tao e88fe00bdb freetype/truetype: fix hinting of compound glyphs.
R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14117043
2013-10-01 18:08:52 +10:00
Nigel Tao 3490800cec 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
2013-09-29 18:30:55 +10:00
Nigel Tao c661e372c6 freetype/truetype: implement IUP opcode.
R=bsiegert
CC=golang-dev
https://codereview.appspot.com/13965043
2013-09-29 12:09:09 +10:00
Nigel Tao 75fff80b59 freetype/truetype: implement IP, MIAP, MIRP opcodes.
R=bsiegert
CC=golang-dev
https://codereview.appspot.com/13855043
2013-09-24 22:06:47 +10:00
Nigel Tao a3c53fdc3f freetype/truetype: implement ALIGNRP, MDAP and MDRP opcodes.
We can now hint the .notdef glyph from luxisr.ttf. Yay.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/12829048
2013-08-31 16:08:40 +10:00
Nigel Tao a8a5cfeb78 freetype: respect the ROUND_XY_TO_GRID compound glyph flag.
Also add a test that freetype-go derives the same glyph points as
the C freetype implementation.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/12670046
2013-08-13 21:08:54 +10:00
Nigel Tao 28cc5fbc5d freetype: move the scaling from FUnits to pixels from package freetype
to package truetype.

R=bsiegert
CC=golang-dev
http://codereview.appspot.com/6427062
2012-07-25 22:10:25 +10:00
Nigel Tao 6baa5f0a46 freetype: optimize []byte to uint16/uint32 conversions.
Thanks to Jeff R. Allen <jra@nella.org> for the conversation that
led to this change.

benchmark              old ns/op    new ns/op    delta
BenchmarkDrawString     21168440     20143860   -4.84%

The number of mallocs per iteration is unchanged.

R=rsc, r
CC=golang-dev, jra
http://codereview.appspot.com/6304077
2012-06-16 12:19:07 +10:00