From dfa8f21e52846eb5a718a53984192a38807a6449 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 3 Apr 2024 03:41:52 +0900 Subject: [PATCH] text/v2: update go-text and remove unnecessary string conversions Updates go-text/typesetting#152 --- go.mod | 2 +- go.sum | 4 ++-- text/v2/gotext.go | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 97fcdf8f4..b8ec7de3d 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/ebitengine/hideconsole v1.0.0 github.com/ebitengine/oto/v3 v3.3.0-alpha.0.20240401142028-457cd3ebf3f3 github.com/ebitengine/purego v0.8.0-alpha - github.com/go-text/typesetting v0.1.1-0.20240325125605-c7936fe59984 + github.com/go-text/typesetting v0.1.1-0.20240402181327-ced1d6822703 github.com/hajimehoshi/bitmapfont/v3 v3.0.0 github.com/hajimehoshi/go-mp3 v0.3.4 github.com/jakecoffman/cp v1.2.1 diff --git a/go.sum b/go.sum index 95239e2e7..b12348136 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/ebitengine/oto/v3 v3.3.0-alpha.0.20240401142028-457cd3ebf3f3 h1:4vw8U github.com/ebitengine/oto/v3 v3.3.0-alpha.0.20240401142028-457cd3ebf3f3/go.mod h1:T2/VV0UWG97GEEf4kORMU2nCneYT/YmwSTxPutSVaUg= github.com/ebitengine/purego v0.8.0-alpha h1:xWsUo8xQZLH8f9TzXXSvs/qjc2s6rhNGYxEo5Qd10so= github.com/ebitengine/purego v0.8.0-alpha/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= -github.com/go-text/typesetting v0.1.1-0.20240325125605-c7936fe59984 h1:NwCC36eQsDf1xVZG9jD7ngXNNjsvk8KXky15ogA1Vo0= -github.com/go-text/typesetting v0.1.1-0.20240325125605-c7936fe59984/go.mod h1:2+owI/sxa73XA581LAzVuEBZ3WEEV2pXeDswCH/3i1I= +github.com/go-text/typesetting v0.1.1-0.20240402181327-ced1d6822703 h1:AqtMl9yw7r319Ah4W2afQm3Ql+PEsQKHds18tGvKhog= +github.com/go-text/typesetting v0.1.1-0.20240402181327-ced1d6822703/go.mod h1:2+owI/sxa73XA581LAzVuEBZ3WEEV2pXeDswCH/3i1I= github.com/go-text/typesetting-utils v0.0.0-20240317173224-1986cbe96c66 h1:GUrm65PQPlhFSKjLPGOZNPNxLCybjzjYBzjfoBGaDUY= github.com/hajimehoshi/bitmapfont/v3 v3.0.0 h1:r2+6gYK38nfztS/et50gHAswb9hXgxXECYgE8Nczmi4= github.com/hajimehoshi/bitmapfont/v3 v3.0.0/go.mod h1:+CxxG+uMmgU4mI2poq944i3uZ6UYFfAkj9V6WqmuvZA= diff --git a/text/v2/gotext.go b/text/v2/gotext.go index 3373693ec..9cdb7361b 100644 --- a/text/v2/gotext.go +++ b/text/v2/gotext.go @@ -18,7 +18,6 @@ import ( "bytes" "encoding/binary" "fmt" - "strings" "github.com/go-text/typesetting/di" glanguage "github.com/go-text/typesetting/language" @@ -265,10 +264,6 @@ func (g *GoTextFace) gScript() glanguage.Script { s, _ := g.Language.Script() str = s.String() } - - // ISO 15924 itself is case-insensitive [1], but go-text uses small-caps. - // [1] https://www.unicode.org/iso15924/faq.html#17 - str = strings.ToLower(str) s, err := glanguage.ParseScript(str) if err != nil { panic(err)