v.0.3.0 calculate char_width with shift operator

This commit is contained in:
tiijay
2025-10-23 14:31:09 +02:00
parent 2eea871408
commit a66b00989f
8 changed files with 377 additions and 182 deletions

View File

@@ -221,9 +221,9 @@ char_width = {
}
def get_char_width(char):
def get_char_width(char, default_witdth=5):
"""Get the display width of a character for proper spacing"""
return char_width.get(char, 5) # Default to 5 if character not found
return char_width.get(char, default_witdth) # Default to 5 if character not found
def get_text_width(text):