fix paths from git.gutmet.org to git.fireandbrimst.one/aw
This commit is contained in:
parent
cf372a053c
commit
410891a161
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -21,8 +23,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/raster"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -24,9 +26,9 @@ import (
|
|||
"math"
|
||||
"os"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -23,8 +25,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"github.com/golang/freetype"
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -20,8 +22,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/raster"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
func p(x, y int) fixed.Point26_6 {
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
// install -tags=example" to install it.
|
||||
|
||||
// Program genbasicfont generates Go source code that imports
|
||||
// git.gutmet.org/golang-image.git/font/basicfont to provide a fixed width font face.
|
||||
// git.fireandbrimst.one/aw/golang-image/font/basicfont to provide a fixed width font face.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -26,9 +28,9 @@ import (
|
|||
"strings"
|
||||
"unicode"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -203,7 +205,7 @@ func main() {
|
|||
|
||||
buf := new(bytes.Buffer)
|
||||
fmt.Fprintf(buf, "// generated by go generate; DO NOT EDIT.\n\npackage %s\n\n", *pkg)
|
||||
fmt.Fprintf(buf, "import (\n\"image\"\n\n\"git.gutmet.org/golang-image.git/font/basicfont\"\n)\n\n")
|
||||
fmt.Fprintf(buf, "import (\n\"image\"\n\n\"git.fireandbrimst.one/aw/golang-image/font/basicfont\"\n)\n\n")
|
||||
fmt.Fprintf(buf, "// %s contains %d %d×%d glyphs in %d Pix bytes.\n",
|
||||
*vr, len(glyphs), width, height, len(glyphs)*width*height)
|
||||
fmt.Fprintf(buf, `var %s = basicfont.Face{
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -21,8 +23,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/raster"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
type node struct {
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -27,8 +29,8 @@ import (
|
|||
"math"
|
||||
"os"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/raster"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
// pDot returns the dot product p·q.
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// FreeType License or the GNU General Public License version 2 (or
|
||||
// any later version), both of which can be found in the LICENSE file.
|
||||
|
||||
//go:build example
|
||||
// +build example
|
||||
|
||||
//
|
||||
// This build tag means that "go install github.com/golang/freetype/..."
|
||||
// doesn't install this example program. Use "go run main.go" to run it or "go
|
||||
|
@ -17,9 +19,9 @@ import (
|
|||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
)
|
||||
|
||||
var fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
|
||||
|
|
10
freetype.go
10
freetype.go
|
@ -6,17 +6,17 @@
|
|||
// The freetype package provides a convenient API to draw text onto an image.
|
||||
// Use the freetype/raster and freetype/truetype packages for lower level
|
||||
// control over rasterization and TrueType parsing.
|
||||
package freetype // import "git.gutmet.org/golang-freetype.git"
|
||||
package freetype // import "git.fireandbrimst.one/aw/golang-freetype"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"image"
|
||||
"image/draw"
|
||||
|
||||
"git.gutmet.org/golang-freetype.git/raster"
|
||||
"git.gutmet.org/golang-freetype.git/truetype"
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-freetype/raster"
|
||||
"git.fireandbrimst.one/aw/golang-freetype/truetype"
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
// These constants determine the size of the glyph cache. The cache is keyed
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
// maxAbs returns the maximum of abs(a) and abs(b).
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
// the Freetype "smooth" module, and the Anti-Grain Geometry library. A
|
||||
// description of the area/coverage algorithm is at
|
||||
// http://projects.tuxee.net/cl-vectors/section-the-cl-aa-algorithm
|
||||
package raster // import "git.gutmet.org/golang-freetype.git/raster"
|
||||
package raster // import "git.fireandbrimst.one/aw/golang-freetype/raster"
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
// A cell is part of a linked list (for a given yi co-ordinate) of accumulated
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
package raster
|
||||
|
||||
import (
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
// Two points are considered practically equal if the square of the distance
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
"image"
|
||||
"math"
|
||||
|
||||
"git.gutmet.org/golang-freetype.git/raster"
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-freetype/raster"
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
func powerOf2(i int) bool {
|
||||
|
@ -134,11 +134,12 @@ func (o *Options) subPixelsY() (value uint32, halfQuantum, mask fixed.Int26_6) {
|
|||
//
|
||||
// For example, q == 4 leads to a bias of 8 and a mask of 0xfffffff0, or -16,
|
||||
// because we want to round fractions of fixed.Int26_6 as:
|
||||
// - 0 to 7 rounds to 0.
|
||||
// - 8 to 23 rounds to 16.
|
||||
// - 24 to 39 rounds to 32.
|
||||
// - 40 to 55 rounds to 48.
|
||||
// - 56 to 63 rounds to 64.
|
||||
// - 0 to 7 rounds to 0.
|
||||
// - 8 to 23 rounds to 16.
|
||||
// - 24 to 39 rounds to 32.
|
||||
// - 40 to 55 rounds to 48.
|
||||
// - 56 to 63 rounds to 64.
|
||||
//
|
||||
// which means to add 8 and then bitwise-and with -16, in two's complement
|
||||
// representation.
|
||||
//
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
func BenchmarkDrawString(b *testing.B) {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
package truetype
|
||||
|
||||
import (
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
// TODO: implement VerticalHinting.
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"errors"
|
||||
"math"
|
||||
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1677,11 +1677,13 @@ func fmul(x, y fixed.Int26_6) fixed.Int26_6 {
|
|||
}
|
||||
|
||||
// dotProduct returns the dot product of [x, y] and q. It is almost the same as
|
||||
//
|
||||
// px := int64(x)
|
||||
// py := int64(y)
|
||||
// qx := int64(q[0])
|
||||
// qy := int64(q[1])
|
||||
// return fixed.Int26_6((px*qx + py*qy + 1<<13) >> 14)
|
||||
//
|
||||
// except that the computation is done with 32-bit integers to produce exactly
|
||||
// the same rounding behavior as C Freetype.
|
||||
func dotProduct(x, y fixed.Int26_6, q [2]f2dot14) fixed.Int26_6 {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
func TestBytecode(t *testing.T) {
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
//
|
||||
// To measure a TrueType font in ideal FUnit space, use scale equal to
|
||||
// font.FUnitsPerEm().
|
||||
package truetype // import "git.gutmet.org/golang-freetype.git/truetype"
|
||||
package truetype // import "git.fireandbrimst.one/aw/golang-freetype/truetype"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
// An Index is a Font's index of a rune.
|
||||
|
|
|
@ -15,8 +15,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.gutmet.org/golang-image.git/font"
|
||||
"git.gutmet.org/golang-image.git/math/fixed"
|
||||
"git.fireandbrimst.one/aw/golang-image/font"
|
||||
"git.fireandbrimst.one/aw/golang-image/math/fixed"
|
||||
)
|
||||
|
||||
func parseTestdataFont(name string) (f *Font, testdataIsOptional bool, err error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user