Skip to content

Commit

Permalink
fix: Add a couple of new characters
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjw committed Oct 18, 2024
1 parent 22bed2e commit 9a28607
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utils/generate_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@

from PIL import Image, ImageDraw, ImageFont

character_set = set(string.digits + string.ascii_letters.upper() + string.punctuation + "‐£$€"
character_set = set(string.digits + string.ascii_letters.upper() + string.punctuation + "‐£$€"
+ "\u2018\u2019\u201c\u201d") # quote marks

character_map: Dict[str, Union[str, List[str]]] = {
"‐": "-",
"–": "-",
"\u2018": "'",
"\u2019": "'",
"\u201c": "\"",
Expand All @@ -44,7 +45,12 @@
"x ",
"xxx",
"x ",
" xx"]
" xx"],
"…": [" ",
" ",
" ",
" ",
"xxx "]
}

def get_max_size(font: ImageFont.FreeTypeFont) -> Tuple[int, int]:
Expand Down

0 comments on commit 9a28607

Please sign in to comment.