v.0.3.0 calculate char_width with shift operator
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user