use slightly bolder NotoSans.

This commit is contained in:
fiatjaf
2023-11-24 13:50:25 -03:00
parent 1e1f2c28b0
commit 47ffe6ee5b
2 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@@ -24,7 +24,7 @@ const (
MAX_CHARS_PER_LINE = 52 MAX_CHARS_PER_LINE = 52
MAX_CHARS_PER_QUOTE_LINE = 48 MAX_CHARS_PER_QUOTE_LINE = 48
FONT_SIZE = 7 FONT_SIZE = 7
FONT_DPI = 300 FONT_DPI = 260
BLOCK = "|" BLOCK = "|"
) )
@@ -162,10 +162,11 @@ func normalizeText(input []string, breakWords bool) []string {
func drawImage(lines []string, ttf *truetype.Font, style Style) (image.Image, error) { func drawImage(lines []string, ttf *truetype.Font, style Style) (image.Image, error) {
width := 700 width := 700
height := 525 height := 525
paddingLeft := 0 paddingLeft := 5
switch style { switch style {
case StyleTelegram: case StyleTelegram:
paddingLeft = 15 paddingLeft += 10
width -= 10
case StyleTwitter: case StyleTwitter:
height = width * 268 / 512 height = width * 268 / 512
} }