From 54d3d47daf9190275bbdaf8703b84969a4593451 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 24 Mar 2017 23:31:34 -0700 Subject: 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 --- vendor/golang.org/x/image/font/sfnt/sfnt_test.go | 74 ++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'vendor/golang.org/x/image/font/sfnt/sfnt_test.go') 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) -- cgit v1.2.3-1-g7c22