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
This commit is contained in:
Nigel Tao 2013-10-04 17:03:59 +10:00
parent 0ec7c0ecae
commit b968fb0953
16 changed files with 9 additions and 10 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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")

View File

@ -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)

View File

@ -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)
}

View File

@ -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)
}