1
0
Fork 0
jebbatime/wasp/fonts/__init__.py

22 lines
418 B
Python
Raw Permalink Normal View History

# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
2021-06-12 13:42:09 -06:00
import fonts.lobstertwobold64 as lobstertwobold64
import fonts.sans18 as sans18
import fonts.sans24 as sans24
2020-06-11 13:36:47 -06:00
import fonts.sans28 as sans28
import fonts.sans36 as sans36
def height(font):
return font.height()
def width(font, s):
w = 0
for ch in s:
(_, _, wc) = font.get_ch(ch)
w += wc + 1
return w