|
10 | 10 | version = "0.0.3" |
11 | 11 |
|
12 | 12 | # reading parameters |
13 | | -words_per_minute = 260 |
| 13 | +words_per_minute = 280 |
14 | 14 | sentence_pause = 1.2 |
15 | 15 | comma_pause = 0.4 |
| 16 | +long_word_modifier = 1.5 |
16 | 17 |
|
17 | 18 | word_pause = 60 / words_per_minute |
18 | 19 |
|
|
29 | 30 | # font paths |
30 | 31 | splash_font_path = "/fonts/Comforta-Regular-20.bdf" |
31 | 32 | reader_font_path = "/fonts/SourceCodePro-Regular-18.bdf" |
32 | | -author_font_path = "/fonts/Comforta-Regular-20.bdf" |
| 33 | +author_font_path = "/fonts/Comforta-Regular-16.bdf" |
33 | 34 |
|
34 | 35 | # message to display |
35 | 36 | messages = [] |
|
39 | 40 | authors.append("Osho") |
40 | 41 |
|
41 | 42 | messages.append("\"Physical concepts are free creations of the human mind, and are not, however it may seem, uniquely determined by the external world. In our endeavor to understand reality we are somewhat like a man trying to understand the mechanism of a closed watch. He sees the face and the moving hands, even hears its ticking, but he has no way of opening the case. If he is ingenious, he may form some picture of a mechanism which could be responsible for all the things he observes, but he may never be quite sure his picture is the only one which could explain his observations. He will never be able to compare his picture with the real mechanism and he cannot even imagine the possibility or the meaning of such a comparison.\"") |
42 | | -authors.append("A. Einstein") |
| 43 | +authors.append("Albert Einstein") |
43 | 44 |
|
44 | 45 | messages.append("\"You think your pain and your heartbreak are un- precedented in the history of the world, but then you read. It was books that taught me that the things that tormented me most were the very things that connected me with all the people who were alive, who had ever been alive.\"") |
45 | | -authors.append("J. Baldwin") |
| 46 | +authors.append("James Baldwin") |
46 | 47 |
|
47 | 48 | # set up display |
48 | 49 | display = displayio.Group() |
|
59 | 60 | text="", |
60 | 61 | color=splash_font_color, |
61 | 62 | anchor_point=(0.0, 0.5), |
62 | | - anchored_position=(24, screen_height//2), |
| 63 | + anchored_position=(screen_width//10, screen_height//2), |
63 | 64 | ) |
64 | 65 | reader_label = label.Label( |
65 | 66 | reader_font, |
|
73 | 74 | text="", |
74 | 75 | color=author_font_color, |
75 | 76 | anchor_point=(0.0, 0.5), |
76 | | - anchored_position=(24, screen_height//2), |
| 77 | + anchored_position=(screen_width//10, screen_height//2), |
77 | 78 | ) |
78 | 79 | version_label = label.Label( |
79 | 80 | terminalio.FONT, |
|
88 | 89 | text="", |
89 | 90 | color=0x000000, |
90 | 91 | anchor_point=(0.0, 0.5), |
91 | | - anchored_position=(24, screen_height//2), |
| 92 | + anchored_position=(screen_width//10, screen_height//2), |
92 | 93 | ) |
93 | 94 | cache_reader_label = label.Label( |
94 | 95 | reader_font, |
|
102 | 103 | text="", |
103 | 104 | color=0x000000, |
104 | 105 | anchor_point=(0.0, 0.5), |
105 | | - anchored_position=(24, screen_height//2), |
| 106 | + anchored_position=(screen_width//10, screen_height//2), |
106 | 107 | ) |
107 | 108 |
|
108 | 109 | display.append(splash_label) |
@@ -161,8 +162,11 @@ def display_typed_text(label, text, delay=0.05, cache_label=None): |
161 | 162 | time.sleep(sentence_pause) |
162 | 163 | elif word[-1] in {",", ":"}: |
163 | 164 | time.sleep(comma_pause) |
| 165 | + elif len(word) > 8: |
| 166 | + time.sleep(word_pause * long_word_modifier) |
| 167 | + else: |
| 168 | + time.sleep(word_pause) |
164 | 169 |
|
165 | | - time.sleep(word_pause) |
166 | 170 | time.sleep(0.8) |
167 | 171 |
|
168 | 172 | clear_display(1) |
|
0 commit comments