1
0
Fork 0
wasp-os/wasp/fonts/__init__.py
thefenriswolf ed3f1c1e71 fonts: add 18pt font
Signed-off-by: thefenriswolf <stefan.rohrbacher97@gmail.com>
[daniel@redfelineninja.org.uk: fixed up the manifest]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-28 08:59:25 +01:00

20 lines
368 B
Python

# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
import fonts.sans18 as sans18
import fonts.sans24 as sans24
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