Add lower case font characters.
This extends the new font to include lower case as well as upper case characters. Add a couple of kerning rules for the lower case characters so that they render nicely, too.
|
@ -40,9 +40,12 @@ import re
|
|||
# visually appealing. This is highly dependent on the font graphics,
|
||||
# and if the font is changed this probably needs to be redone.
|
||||
|
||||
# TODO: Add more rule for lower-case characters.
|
||||
|
||||
FONT_KERNING_RULES = {
|
||||
# Right character fits under left character:
|
||||
r'[TY][07ACOSZ]': -2,
|
||||
r'[TYty][a]': -2,
|
||||
r'P[A]': -3,
|
||||
r'P[7]': -2,
|
||||
r'P[Z]': -1,
|
||||
|
@ -61,6 +64,9 @@ FONT_KERNING_RULES = {
|
|||
r'Q[Y]': -1,
|
||||
r'A[TYV]': -2,
|
||||
r'A[GC]': -1,
|
||||
r'a[TYty]': -2,
|
||||
r'a[vV]': -2,
|
||||
r'a[g]': -1,
|
||||
|
||||
# Fits into "hole" in left character:
|
||||
r'[BCX8][0CGOQ]': -2,
|
||||
|
|
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 327 B |
BIN
graphics/text/fontchars/font097.gif
Normal file
After Width: | Height: | Size: 353 B |
BIN
graphics/text/fontchars/font098.gif
Normal file
After Width: | Height: | Size: 348 B |
BIN
graphics/text/fontchars/font099.gif
Normal file
After Width: | Height: | Size: 331 B |
BIN
graphics/text/fontchars/font100.gif
Normal file
After Width: | Height: | Size: 356 B |
BIN
graphics/text/fontchars/font101.gif
Normal file
After Width: | Height: | Size: 329 B |
BIN
graphics/text/fontchars/font102.gif
Normal file
After Width: | Height: | Size: 329 B |
BIN
graphics/text/fontchars/font103.gif
Normal file
After Width: | Height: | Size: 345 B |
BIN
graphics/text/fontchars/font104.gif
Normal file
After Width: | Height: | Size: 352 B |
BIN
graphics/text/fontchars/font105.gif
Normal file
After Width: | Height: | Size: 211 B |
BIN
graphics/text/fontchars/font106.gif
Normal file
After Width: | Height: | Size: 332 B |
BIN
graphics/text/fontchars/font107.gif
Normal file
After Width: | Height: | Size: 358 B |
BIN
graphics/text/fontchars/font108.gif
Normal file
After Width: | Height: | Size: 312 B |
BIN
graphics/text/fontchars/font109.gif
Normal file
After Width: | Height: | Size: 370 B |
BIN
graphics/text/fontchars/font110.gif
Normal file
After Width: | Height: | Size: 360 B |
BIN
graphics/text/fontchars/font111.gif
Normal file
After Width: | Height: | Size: 336 B |
BIN
graphics/text/fontchars/font112.gif
Normal file
After Width: | Height: | Size: 329 B |
BIN
graphics/text/fontchars/font113.gif
Normal file
After Width: | Height: | Size: 343 B |
BIN
graphics/text/fontchars/font114.gif
Normal file
After Width: | Height: | Size: 336 B |
BIN
graphics/text/fontchars/font115.gif
Normal file
After Width: | Height: | Size: 357 B |
BIN
graphics/text/fontchars/font116.gif
Normal file
After Width: | Height: | Size: 328 B |
BIN
graphics/text/fontchars/font117.gif
Normal file
After Width: | Height: | Size: 351 B |
BIN
graphics/text/fontchars/font118.gif
Normal file
After Width: | Height: | Size: 356 B |
BIN
graphics/text/fontchars/font119.gif
Normal file
After Width: | Height: | Size: 362 B |
BIN
graphics/text/fontchars/font120.gif
Normal file
After Width: | Height: | Size: 351 B |
BIN
graphics/text/fontchars/font121.gif
Normal file
After Width: | Height: | Size: 326 B |
BIN
graphics/text/fontchars/font122.gif
Normal file
After Width: | Height: | Size: 335 B |
BIN
graphics/text/fontchars/font123.gif
Normal file
After Width: | Height: | Size: 221 B |
BIN
graphics/text/fontchars/font124.gif
Normal file
After Width: | Height: | Size: 200 B |
BIN
graphics/text/fontchars/font125.gif
Normal file
After Width: | Height: | Size: 330 B |
BIN
graphics/text/fontchars/font126.gif
Normal file
After Width: | Height: | Size: 204 B |
|
@ -55,10 +55,10 @@ BACKGROUND_COLOR = '#00ffff'
|
|||
|
||||
# Height of font in pixels.
|
||||
FONT_HEIGHT = 15
|
||||
FONT_LC_HEIGHT = 12
|
||||
FONT_LC_HEIGHT = 15 #12
|
||||
|
||||
# If true, the font only has uppercase characters.
|
||||
UPPERCASE_FONT = True
|
||||
UPPERCASE_FONT = False
|
||||
|
||||
# Width of a space character in pixels.
|
||||
SPACE_WIDTH = 7
|
||||
|
|