Skip to content

Commit

Permalink
fix: always (#633)
Browse files Browse the repository at this point in the history
* update deps

* update always

* fix: always: broken images and fonts
  • Loading branch information
shudorcl committed Mar 22, 2023
1 parent 6838691 commit 1376803
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/FloatTech/AnimeAPI v1.6.1-0.20230316111643-46d40c9d80e3
github.com/FloatTech/floatbox v0.0.0-20230316111222-7ffde57284cc
github.com/FloatTech/gg v1.1.2
github.com/FloatTech/imgfactory v0.2.2-0.20230315152233-49741fc994f9
github.com/FloatTech/imgfactory v0.2.2-0.20230322091809-b0ddbe44b94b
github.com/FloatTech/rendercard v0.0.10-0.20230223064326-45d29fa4ede9
github.com/FloatTech/sqlite v1.5.7
github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/FloatTech/gg v1.1.2 h1:YolgOYg3uDHc1+g0bLtt6QuRA/pvLn+b9IBCIhOOX88=
github.com/FloatTech/gg v1.1.2/go.mod h1:uzPzAeT35egARdRuu+1oyjU3CmTwCceoq3Vvje7LpcI=
github.com/FloatTech/imgfactory v0.2.2-0.20230315152233-49741fc994f9 h1:IzZLuM/fgKclyMaU/Qb1qlLdGrs2FTietkqOWhh07Gw=
github.com/FloatTech/imgfactory v0.2.2-0.20230315152233-49741fc994f9/go.mod h1:el5hGpj1C1bDRxcTXYRwEivDCr40zZeJpcrLrB1fajs=
github.com/FloatTech/imgfactory v0.2.2-0.20230322091809-b0ddbe44b94b h1:VMNci4SWBySdw/6poqF9Dn9zlT5ntTFSJOEEBjRnJ/4=
github.com/FloatTech/imgfactory v0.2.2-0.20230322091809-b0ddbe44b94b/go.mod h1:el5hGpj1C1bDRxcTXYRwEivDCr40zZeJpcrLrB1fajs=
github.com/FloatTech/rendercard v0.0.10-0.20230223064326-45d29fa4ede9 h1:hffajvmQFfP68U6wUwHemPuuwCUoss+SEFfoLYwbGwE=
github.com/FloatTech/rendercard v0.0.10-0.20230223064326-45d29fa4ede9/go.mod h1:NBFPhWae4hqVMeG8ELBBnUQkKce3nDjkljVn6PdiUNs=
github.com/FloatTech/sqlite v1.5.7 h1:Bvo4LSojcZ6dVtbHrkqvt6z4v8e+sj0G5PSUIvdawsk=
Expand Down
4 changes: 2 additions & 2 deletions plugin/gif/gif.go
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ func alwaysDoGif(cc *context, value ...string) (string, error) {
var err error
var face []*imgfactory.Factory
name := cc.usrdir + "AlwaysDo.gif"
face, err = imgfactory.LoadAllFrames(cc.headimgsdir[0], 500, 500)
face, err = imgfactory.LoadAllTrueFrames(cc.headimgsdir[0], 500, 500)
if err != nil {
// 载入失败尝试载入第一帧
face = nil
Expand Down Expand Up @@ -1438,7 +1438,7 @@ func alwaysDoGif(cc *context, value ...string) (string, error) {
canvas := gg.NewContext(500, 600)
canvas.DrawImage(f.Image(), 0, 0)
canvas.SetColor(color.Black)
// _ = canvas.ParseFontFace(data, 40)
_ = canvas.ParseFontFace(data, 40)
canvas.DrawString(arg, 280-l, 560)
canvas.DrawImage(imgfactory.Size(f.Image(), 90, 90).Image(), 280, 505)
canvas.DrawString("吗", 370, 560)
Expand Down

0 comments on commit 1376803

Please sign in to comment.