File tree Expand file tree Collapse file tree 1 file changed +21
-18
lines changed
Expand file tree Collapse file tree 1 file changed +21
-18
lines changed Original file line number Diff line number Diff line change 33__generated_with = "0.18.0"
44app = 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
4865def _ ():
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-
7578if __name__ == "__main__" :
7679 app .run ()
You can’t perform that action at this time.
0 commit comments