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.
This commit is contained in:
Brett Harrell 2014-07-12 22:44:33 +00:00 committed by Simon Howard
parent 5d15042c39
commit c1af20bcb7
35 changed files with 8 additions and 2 deletions

View file

@ -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,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 325 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 327 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

View file

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