From b968fb09532a0363c1fff0b1673c2f58e011a8f7 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Fri, 4 Oct 2013 17:03:59 +1000 Subject: [PATCH] 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 --- LICENSE | 5 ++--- cmd/print-glyph-points/main.c | 2 +- example/freetype/main.go | 2 +- example/truetype/main.go | 2 +- freetype/freetype_test.go | 2 +- freetype/truetype/truetype_test.go | 6 +++--- {luxi-fonts => testdata}/COPYING | 0 {luxi-fonts => testdata}/README | 0 {luxi-fonts => testdata}/luximr.ttf | Bin {luxi-fonts => testdata}/luximr.ttx | 0 {luxi-fonts => testdata}/luxirr.ttf | Bin {luxi-fonts => testdata}/luxirr.ttx | 0 .../luxisr-12pt-sans-hinting.txt | 0 .../luxisr-12pt-with-hinting.txt | 0 {luxi-fonts => testdata}/luxisr.ttf | Bin {luxi-fonts => testdata}/luxisr.ttx | 0 16 files changed, 9 insertions(+), 10 deletions(-) rename {luxi-fonts => testdata}/COPYING (100%) rename {luxi-fonts => testdata}/README (100%) rename {luxi-fonts => testdata}/luximr.ttf (100%) rename {luxi-fonts => testdata}/luximr.ttx (100%) rename {luxi-fonts => testdata}/luxirr.ttf (100%) rename {luxi-fonts => testdata}/luxirr.ttx (100%) rename {luxi-fonts => testdata}/luxisr-12pt-sans-hinting.txt (100%) rename {luxi-fonts => testdata}/luxisr-12pt-with-hinting.txt (100%) rename {luxi-fonts => testdata}/luxisr.ttf (100%) rename {luxi-fonts => testdata}/luxisr.ttx (100%) diff --git a/LICENSE b/LICENSE index 1aab6a7..e854ba5 100644 --- a/LICENSE +++ b/LICENSE @@ -8,6 +8,5 @@ The text of these licenses are available in the licenses/ftl.txt and the licenses/gpl.txt files respectively. They are also available at http://freetype.sourceforge.net/license.html -The files in the luxi-fonts directory are licensed separately. See the -luxi-fonts/COPYING file for details. - +The Luxi fonts in the testdata directory are licensed separately. See the +testdata/COPYING file for details. diff --git a/cmd/print-glyph-points/main.c b/cmd/print-glyph-points/main.c index 1f5b685..b63dc3c 100644 --- a/cmd/print-glyph-points/main.c +++ b/cmd/print-glyph-points/main.c @@ -21,7 +21,7 @@ int main(int argc, char** argv) { printf("FT_Init_FreeType: error #%d\n", error); return 1; } - error = FT_New_Face(library, "../../luxi-fonts/luxisr.ttf", 0, &face); + error = FT_New_Face(library, "../../testdata/luxisr.ttf", 0, &face); if (error) { printf("FT_New_Face: error #%d\n", error); return 1; diff --git a/example/freetype/main.go b/example/freetype/main.go index 2d52c7a..2f5404b 100644 --- a/example/freetype/main.go +++ b/example/freetype/main.go @@ -22,7 +22,7 @@ import ( var ( dpi = flag.Float64("dpi", 72, "screen resolution in Dots Per Inch") - fontfile = flag.String("fontfile", "../../luxi-fonts/luxisr.ttf", "filename of the ttf font") + fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font") size = flag.Float64("size", 12, "font size in points") spacing = flag.Float64("spacing", 1.5, "line spacing (e.g. 2 means double spaced)") wonb = flag.Bool("whiteonblack", false, "white text on a black background") diff --git a/example/truetype/main.go b/example/truetype/main.go index 5078840..68dc6fb 100644 --- a/example/truetype/main.go +++ b/example/truetype/main.go @@ -14,7 +14,7 @@ import ( "code.google.com/p/freetype-go/freetype/truetype" ) -var fontfile = flag.String("fontfile", "../../luxi-fonts/luxisr.ttf", "filename of the ttf font") +var fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font") func printBounds(b truetype.Bounds) { fmt.Printf("XMin:%d YMin:%d XMax:%d YMax:%d\n", b.XMin, b.YMin, b.XMax, b.YMax) diff --git a/freetype/freetype_test.go b/freetype/freetype_test.go index 07294e8..39f56b3 100644 --- a/freetype/freetype_test.go +++ b/freetype/freetype_test.go @@ -21,7 +21,7 @@ func BenchmarkDrawString(b *testing.B) { } lines := strings.Split(string(data), "\n") - data, err = ioutil.ReadFile("../luxi-fonts/luxisr.ttf") + data, err = ioutil.ReadFile("../testdata/luxisr.ttf") if err != nil { b.Fatal(err) } diff --git a/freetype/truetype/truetype_test.go b/freetype/truetype/truetype_test.go index 18b65b5..294d0b0 100644 --- a/freetype/truetype/truetype_test.go +++ b/freetype/truetype/truetype_test.go @@ -19,7 +19,7 @@ import ( // TestParse tests that the luxisr.ttf metrics and glyphs are parsed correctly. // The numerical values can be manually verified by examining luxisr.ttx. func TestParse(t *testing.T) { - b, err := ioutil.ReadFile("../../luxi-fonts/luxisr.ttf") + b, err := ioutil.ReadFile("../../testdata/luxisr.ttf") if err != nil { t.Fatal(err) } @@ -75,7 +75,7 @@ func TestParse(t *testing.T) { } func testScaling(t *testing.T, filename string, hinter *Hinter) { - b, err := ioutil.ReadFile("../../luxi-fonts/luxisr.ttf") + b, err := ioutil.ReadFile("../../testdata/luxisr.ttf") if err != nil { t.Fatalf("ReadFile: %v", err) } @@ -83,7 +83,7 @@ func testScaling(t *testing.T, filename string, hinter *Hinter) { if err != nil { t.Fatalf("Parse: %v", err) } - f, err := os.Open("../../luxi-fonts/" + filename) + f, err := os.Open("../../testdata/" + filename) if err != nil { t.Fatalf("Open: %v", err) } diff --git a/luxi-fonts/COPYING b/testdata/COPYING similarity index 100% rename from luxi-fonts/COPYING rename to testdata/COPYING diff --git a/luxi-fonts/README b/testdata/README similarity index 100% rename from luxi-fonts/README rename to testdata/README diff --git a/luxi-fonts/luximr.ttf b/testdata/luximr.ttf similarity index 100% rename from luxi-fonts/luximr.ttf rename to testdata/luximr.ttf diff --git a/luxi-fonts/luximr.ttx b/testdata/luximr.ttx similarity index 100% rename from luxi-fonts/luximr.ttx rename to testdata/luximr.ttx diff --git a/luxi-fonts/luxirr.ttf b/testdata/luxirr.ttf similarity index 100% rename from luxi-fonts/luxirr.ttf rename to testdata/luxirr.ttf diff --git a/luxi-fonts/luxirr.ttx b/testdata/luxirr.ttx similarity index 100% rename from luxi-fonts/luxirr.ttx rename to testdata/luxirr.ttx diff --git a/luxi-fonts/luxisr-12pt-sans-hinting.txt b/testdata/luxisr-12pt-sans-hinting.txt similarity index 100% rename from luxi-fonts/luxisr-12pt-sans-hinting.txt rename to testdata/luxisr-12pt-sans-hinting.txt diff --git a/luxi-fonts/luxisr-12pt-with-hinting.txt b/testdata/luxisr-12pt-with-hinting.txt similarity index 100% rename from luxi-fonts/luxisr-12pt-with-hinting.txt rename to testdata/luxisr-12pt-with-hinting.txt diff --git a/luxi-fonts/luxisr.ttf b/testdata/luxisr.ttf similarity index 100% rename from luxi-fonts/luxisr.ttf rename to testdata/luxisr.ttf diff --git a/luxi-fonts/luxisr.ttx b/testdata/luxisr.ttx similarity index 100% rename from luxi-fonts/luxisr.ttx rename to testdata/luxisr.ttx