Skip to content

Commit 0a4e42d

Browse files
committed
Fix Windows compatibility by removing curses dependency.
1 parent 04ece19 commit 0a4e42d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fontbro/font.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import tempfile
99
from collections import Counter
1010
from collections.abc import Generator
11-
from curses import ascii
1211
from io import BytesIO
1312
from pathlib import Path
1413
from typing import IO, Any, cast
@@ -550,7 +549,9 @@ def get_characters(
550549
char = chr(code)
551550
else:
552551
continue
553-
if ascii.iscntrl(char):
552+
# check if is control character
553+
char_code = ord(char)
554+
if char_code < 0x20 or char_code == 0x7F:
554555
continue
555556
if glyfs and ignore_blank:
556557
glyf = glyfs.get(char_name)

0 commit comments

Comments
 (0)