meme: change fonts

This commit is contained in:
Chris Sexton 2020-04-29 12:09:05 -04:00 committed by Chris Sexton
parent 49991e530a
commit dcb6c3740d
1 changed files with 3 additions and 2 deletions

View File

@ -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)
} }
} }