Skip to content

Commit 47bad39

Browse files
committed
Update latin3 script
1 parent 18c855f commit 47bad39

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

latin3_terminus_14_bold.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__generated_with = "0.18.0"
44
app = marimo.App()
55

6-
with app.setup:
6+
with app.setup(hide_code=True):
77
from pathlib import Path
88
from PIL import Image
99
import marimo as mo
@@ -37,13 +37,30 @@ def get_latin3_font() -> Image.Image:
3737
fg.draw_char("~")
3838

3939
fg.set_padding(0, 1)
40-
fg.set_position(0, 6)
41-
fg.draw_char("`")
40+
fg.redraw_characters("`")
4241

43-
fg.redraw_characters("°²³ĥÀÁÂÄĊĈÈÉÊËÌÍÎÏÑÒÓÔĠÖĜÙÚÛÜŬŜ")
42+
fg.set_padding(0, 0)
43+
fg.redraw_characters("§°²³")
44+
45+
fg.set_padding(0, 1)
46+
fg.redraw_characters("´Ĥ¨ĞŻĴĥÀÁÂÄĊĈÈÉÊËÌÍÎÏÑÒÓÔĠÖĜÙÚÛÜŬŜ˙")
4447
return fg.image
4548

4649

50+
@app.cell
51+
def _(image):
52+
# Show resulting image (upscaled to see details)
53+
preview = None
54+
if mo.running_in_notebook():
55+
scale = 3
56+
width = image.width * scale
57+
height = image.height * scale
58+
preview = image.resize((width, height), Image.Resampling.NEAREST)
59+
60+
preview # type: ignore
61+
return
62+
63+
4764
@app.cell
4865
def _():
4966
image = get_latin3_font()
@@ -58,19 +75,5 @@ def _(image):
5875
return
5976

6077

61-
@app.cell
62-
def _(image):
63-
# Show resulting image (scaled x2 to see details)
64-
preview = None
65-
if mo.running_in_notebook():
66-
scale = 2
67-
width = image.width * scale
68-
height = image.height * scale
69-
preview = image.resize((width, height), Image.Resampling.NEAREST)
70-
71-
preview # type: ignore
72-
return
73-
74-
7578
if __name__ == "__main__":
7679
app.run()

0 commit comments

Comments
 (0)