Commit 2ab3d2e665
Verified · cmc
Layout: unified · split
content/blog/2026-08-20-nfogen.org +4 −4
| @@ -270,10 +270,10 @@ rows and columns. | ||
| 270 | 270 | ** Width |
| 271 | 271 | |
| 272 | 272 | The first issue I ran into was determining the width to use. I settled on 79 |
| 273 | characters, with border characters at both ends, because 80-column terminals, | |
| 274 | minus one so the line doesn't wrap when a terminal auto-wraps at exactly 80. | |
| 275 | This means that my script needs to perform some math to calculate wrapping, | |
| 276 | padding, and centering of text throughout. | |
| 273 | characters, border characters included, because terminals were 80 columns wide | |
| 274 | and a line that hits exactly 80 wraps on its own. This means that my script | |
| 275 | needs to perform some math to calculate wrapping, padding, and centering of text | |
| 276 | throughout. | |
| 277 | 277 | |
| 278 | 278 | The math is relatively simple because CP437 is single-byte and single-width, |
| 279 | 279 | which means I can write functions that depend on that one-to-one correlation |