mirror of https://github.com/velour/catbase.git
meme: change fonts
This commit is contained in:
parent
49991e530a
commit
dcb6c3740d
|
@ -161,7 +161,7 @@ var defaultFormats = map[string]string{
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *MemePlugin) genMeme(meme, top, bottom string) string {
|
func (p *MemePlugin) genMeme(meme, top, bottom string) string {
|
||||||
fontSizes := []float64{96, 48, 24, 12}
|
fontSizes := []float64{48, 36, 24, 16, 12}
|
||||||
fontSize := fontSizes[0]
|
fontSize := fontSizes[0]
|
||||||
|
|
||||||
formats := p.c.GetMap("meme.memes", defaultFormats)
|
formats := p.c.GetMap("meme.memes", defaultFormats)
|
||||||
|
@ -213,7 +213,8 @@ func (p *MemePlugin) genMeme(meme, top, bottom string) string {
|
||||||
}
|
}
|
||||||
x := float64(w/2 + dx)
|
x := float64(w/2 + dx)
|
||||||
y := float64(h) - fontSize + float64(dy)
|
y := float64(h) - fontSize + float64(dy)
|
||||||
m.DrawStringAnchored(top, x, fontSize, 0.5, 0.5)
|
y0 := fontSize + float64(dy)
|
||||||
|
m.DrawStringAnchored(top, x, y0, 0.5, 0.5)
|
||||||
m.DrawStringAnchored(bottom, x, y, 0.5, 0.5)
|
m.DrawStringAnchored(bottom, x, y, 0.5, 0.5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue