Skip to content

Commit c3899a0

Browse files
committed
Select font dependng on pyportal model
1 parent 0a9d2cc commit c3899a0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CircuitPython_Zorque_Text_Game_openai/code.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
# Place the key in your settings.toml file
3131
openai_api_key = os.getenv("OPENAI_API_KEY")
3232

33-
nice_font = load_font("helvR10.pcf")
33+
# Select a 14-point font for the PyPortal titano, 10-point for original & Pynt
34+
if board.DISPLAY.width > 320:
35+
nice_font = load_font("helvR14.pcf")
36+
else:
37+
nice_font = load_font("helvR10.pcf")
3438
line_spacing = 0.75
3539

3640
# Customize this prompt as you see fit to create a different experience
Binary file not shown.

0 commit comments

Comments
 (0)