diff options
author | Corey Hulen <corey@hulen.com> | 2017-03-24 23:31:34 -0700 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-03-25 03:31:34 -0300 |
commit | 54d3d47daf9190275bbdaf8703b84969a4593451 (patch) | |
tree | 05899b296d0186c1a0da8a540bc486e34ad8eec9 /vendor/golang.org/x/image/font/sfnt/sfnt_test.go | |
parent | 7460302dec7796e01c98264e84bece8169cb6ed9 (diff) | |
download | chat-54d3d47daf9190275bbdaf8703b84969a4593451.tar.gz chat-54d3d47daf9190275bbdaf8703b84969a4593451.tar.bz2 chat-54d3d47daf9190275bbdaf8703b84969a4593451.zip |
PLT-6076 Adding viper libs for config file changes (#5871)
* Adding viper libs for config file changes
* Removing the old fsnotify lib
* updating some missing libs
Diffstat (limited to 'vendor/golang.org/x/image/font/sfnt/sfnt_test.go')
-rw-r--r-- | vendor/golang.org/x/image/font/sfnt/sfnt_test.go | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/vendor/golang.org/x/image/font/sfnt/sfnt_test.go b/vendor/golang.org/x/image/font/sfnt/sfnt_test.go index 85d96a96f..dc1c9c54f 100644 --- a/vendor/golang.org/x/image/font/sfnt/sfnt_test.go +++ b/vendor/golang.org/x/image/font/sfnt/sfnt_test.go @@ -43,6 +43,16 @@ func cubeTo(xa, ya, xb, yb, xc, yc fixed.Int26_6) Segment { } } +func translate(dx, dy fixed.Int26_6, s Segment) Segment { + translateArgs(&s.Args, dx, dy) + return s +} + +func transform(txx, txy, tyx, tyy int16, dx, dy fixed.Int26_6, s Segment) Segment { + transformArgs(&s.Args, txx, txy, tyx, tyy, dx, dy) + return s +} + func checkSegmentsEqual(got, want []Segment) error { if len(got) != len(want) { return fmt.Errorf("got %d elements, want %d\noverall:\ngot %v\nwant %v", @@ -378,6 +388,70 @@ func TestTrueTypeSegments(t *testing.T) { lineTo(614, 1638), lineTo(614, 0), lineTo(205, 0), + }, { + // five + // - contour #0 + moveTo(0, 0), + lineTo(0, 100), + lineTo(400, 100), + lineTo(400, 0), + lineTo(0, 0), + }, { + // six + // - contour #0 + moveTo(0, 0), + lineTo(0, 100), + lineTo(400, 100), + lineTo(400, 0), + lineTo(0, 0), + // - contour #1 + translate(111, 234, moveTo(205, 0)), + translate(111, 234, lineTo(205, 1638)), + translate(111, 234, lineTo(614, 1638)), + translate(111, 234, lineTo(614, 0)), + translate(111, 234, lineTo(205, 0)), + }, { + // seven + // - contour #0 + moveTo(0, 0), + lineTo(0, 100), + lineTo(400, 100), + lineTo(400, 0), + lineTo(0, 0), + // - contour #1 + transform(1<<13, 0, 0, 1<<13, 56, 117, moveTo(205, 0)), + transform(1<<13, 0, 0, 1<<13, 56, 117, lineTo(205, 1638)), + transform(1<<13, 0, 0, 1<<13, 56, 117, lineTo(614, 1638)), + transform(1<<13, 0, 0, 1<<13, 56, 117, lineTo(614, 0)), + transform(1<<13, 0, 0, 1<<13, 56, 117, lineTo(205, 0)), + }, { + // eight + // - contour #0 + moveTo(0, 0), + lineTo(0, 100), + lineTo(400, 100), + lineTo(400, 0), + lineTo(0, 0), + // - contour #1 + transform(3<<13, 0, 0, 1<<13, 56, 117, moveTo(205, 0)), + transform(3<<13, 0, 0, 1<<13, 56, 117, lineTo(205, 1638)), + transform(3<<13, 0, 0, 1<<13, 56, 117, lineTo(614, 1638)), + transform(3<<13, 0, 0, 1<<13, 56, 117, lineTo(614, 0)), + transform(3<<13, 0, 0, 1<<13, 56, 117, lineTo(205, 0)), + }, { + // nine + // - contour #0 + moveTo(0, 0), + lineTo(0, 100), + lineTo(400, 100), + lineTo(400, 0), + lineTo(0, 0), + // - contour #1 + transform(22381, 8192, 5996, 14188, 237, 258, moveTo(205, 0)), + transform(22381, 8192, 5996, 14188, 237, 258, lineTo(205, 1638)), + transform(22381, 8192, 5996, 14188, 237, 258, lineTo(614, 1638)), + transform(22381, 8192, 5996, 14188, 237, 258, lineTo(614, 0)), + transform(22381, 8192, 5996, 14188, 237, 258, lineTo(205, 0)), }} testSegments(t, "glyfTest.ttf", wants) |