Commit graph

18 commits

Author SHA1 Message Date
Nigel Tao
ba07cbfbc8 freetype/truetype: set the four phantom points, and adjust the glyph
points accordingly.

Yes, it's a mess, but let's pass the tests first, and then refactor.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14419052
2013-10-10 07:43:32 +11: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
7505dadf20 freetype/truetype: make a (sub-)glyph's points an explicit part of a
Hinter's state, instead of having a glyph shrink and restore its
points around hinting.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/14203043
2013-10-02 20:37:11 +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
43c4b0b00d freetype/truetype: add explicit graphics state.
These new opcodes aren't unit-tested per se, but they will be
exercised by an end-to-end hinting test of the Luxi fonts.

R=bsiegert
CC=golang-dev
https://codereview.appspot.com/12100043
2013-08-02 19:13:26 +10:00
Nigel Tao
e3b4bc4c1f freetype/truetype: function call opcodes.
R=bsiegert
CC=golang-dev
https://codereview.appspot.com/11983043
2013-07-30 19:20:31 +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
f2517f3940 freetype/truetype: odd/even opcodes.
Also re-arrange some of the switch cases to be in opcode order.

R=bsiegert
CC=golang-dev
http://codereview.appspot.com/6352097
2012-07-12 20:49:12 +10:00
Nigel Tao
20ce6ab4df freetype/truetype: variable sized bytecode interpreter stack/store.
R=bsiegert
CC=golang-dev
http://codereview.appspot.com/6343091
2012-07-11 21:49:03 +10:00
Nigel Tao
2bf22ccf6b freetype/truetype: vector set/gets, store ops, roll/max/min ops.
R=bsiegert
CC=golang-dev
http://codereview.appspot.com/6354080
2012-07-09 23:18:25 +10:00
Nigel Tao
9e927de79b freetype/truetype: rounding opcodes.
R=bsiegert
CC=golang-dev
http://codereview.appspot.com/6348079
2012-07-06 17:34:39 +10:00
Nigel Tao
e843d5cf7c freetype/truetype: jump opcodes.
R=gri, bsiegert
CC=golang-dev
http://codereview.appspot.com/6344079
2012-07-05 20:29:35 +10:00
Nigel Tao
523d04e0a7 freetype/truetype: if/else opcodes.
R=gri
CC=golang-dev
http://codereview.appspot.com/6354067
2012-07-04 21:28:44 +10:00
Nigel Tao
8ed9e9345e freetype/truetype: first cut of a bytecode interpreter.
R=gri, bsiegert
CC=golang-dev
http://codereview.appspot.com/6347057
2012-07-03 20:46:16 +10:00