diff --git a/example/freetype/main.go b/example/freetype/main.go index 15e312a..3b96c30 100644 --- a/example/freetype/main.go +++ b/example/freetype/main.go @@ -9,7 +9,6 @@ import ( "bufio" "flag" "fmt" - "freetype-go.googlecode.com/hg/freetype" "image" "image/color" "image/draw" @@ -17,6 +16,8 @@ import ( "io/ioutil" "log" "os" + + "code.google.com/p/freetype-go/freetype" ) var ( diff --git a/example/gamma/main.go b/example/gamma/main.go index ddd497b..aa3ce97 100644 --- a/example/gamma/main.go +++ b/example/gamma/main.go @@ -14,7 +14,7 @@ import ( "log" "os" - "freetype-go.googlecode.com/hg/freetype/raster" + "code.google.com/p/freetype-go/freetype/raster" ) func p(x, y int) raster.Point { diff --git a/example/raster/main.go b/example/raster/main.go index d540d13..8f1bb0f 100644 --- a/example/raster/main.go +++ b/example/raster/main.go @@ -15,7 +15,7 @@ import ( "log" "os" - "freetype-go.googlecode.com/hg/freetype/raster" + "code.google.com/p/freetype-go/freetype/raster" ) type node struct { diff --git a/example/round/main.go b/example/round/main.go index 2b586b9..bd7fb01 100644 --- a/example/round/main.go +++ b/example/round/main.go @@ -21,7 +21,7 @@ import ( "math" "os" - "freetype-go.googlecode.com/hg/freetype/raster" + "code.google.com/p/freetype-go/freetype/raster" ) func main() { diff --git a/example/truetype/main.go b/example/truetype/main.go index 3e0c005..a739073 100644 --- a/example/truetype/main.go +++ b/example/truetype/main.go @@ -11,7 +11,7 @@ import ( "io/ioutil" "log" - "freetype-go.googlecode.com/hg/freetype/truetype" + "code.google.com/p/freetype-go/freetype/truetype" ) var fontfile = flag.String("fontfile", "../../luxi-fonts/luxisr.ttf", "filename of the ttf font") diff --git a/freetype/Makefile b/freetype/Makefile index 8bee40e..c3232f6 100644 --- a/freetype/Makefile +++ b/freetype/Makefile @@ -5,7 +5,7 @@ include $(GOROOT)/src/Make.inc -TARG=freetype-go.googlecode.com/hg/freetype +TARG=code.google.com/p/freetype-go/freetype GOFILES=\ freetype.go\ diff --git a/freetype/freetype.go b/freetype/freetype.go index cd82f2d..e0ffb8b 100644 --- a/freetype/freetype.go +++ b/freetype/freetype.go @@ -10,10 +10,11 @@ package freetype import ( "errors" - "freetype-go.googlecode.com/hg/freetype/raster" - "freetype-go.googlecode.com/hg/freetype/truetype" "image" "image/draw" + + "code.google.com/p/freetype-go/freetype/raster" + "code.google.com/p/freetype-go/freetype/truetype" ) // These constants determine the size of the glyph cache. The cache is keyed diff --git a/freetype/raster/Makefile b/freetype/raster/Makefile index 11ca529..7ba5d34 100644 --- a/freetype/raster/Makefile +++ b/freetype/raster/Makefile @@ -5,7 +5,7 @@ include $(GOROOT)/src/Make.inc -TARG=freetype-go.googlecode.com/hg/freetype/raster +TARG=code.google.com/p/freetype-go/freetype/raster GOFILES=\ geom.go\ paint.go\ diff --git a/freetype/truetype/Makefile b/freetype/truetype/Makefile index 8196f58..2e0b3c2 100644 --- a/freetype/truetype/Makefile +++ b/freetype/truetype/Makefile @@ -5,7 +5,7 @@ include $(GOROOT)/src/Make.inc -TARG=freetype-go.googlecode.com/hg/freetype/truetype +TARG=code.google.com/p/freetype-go/freetype/truetype GOFILES=\ truetype.go\ diff --git a/freetype/truetype/truetype.go b/freetype/truetype/truetype.go index ffec56e..58dae1b 100644 --- a/freetype/truetype/truetype.go +++ b/freetype/truetype/truetype.go @@ -17,7 +17,7 @@ import ( "fmt" ) -// An Index is a Font's index of a Unicode code point. +// An Index is a Font's index of a rune. type Index uint16 // A Bounds holds the co-ordinate range of one or more glyphs. @@ -287,9 +287,9 @@ func (f *Font) UnitsPerEm() int { return f.unitsPerEm } -// Index returns a Font's index for the given Unicode code point. -func (f *Font) Index(codePoint int) Index { - c := uint16(codePoint) +// Index returns a Font's index for the given rune. +func (f *Font) Index(x rune) Index { + c := uint16(x) n := len(f.cm) for i := 0; i < n; i++ { if f.cm[i].start <= c && c <= f.cm[i].end {