Skip to content

Commit 8a6bb65

Browse files
authored
Merge pull request #791 from LionsPhil/doc765
Document PicoGraphics fixed_width
2 parents 6fb35df + a0fe954 commit 8a6bb65

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

micropython/modules/picographics/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ These are aligned from their top-left corner.
305305
* `bitmap8`
306306
* `bitmap14_outline`
307307

308-
Vector (Hershey) fonts.
308+
Vector (Hershey) fonts.
309309
These are aligned horizontally (x) to their left edge, but vertically (y) to their midline excluding descenders [i.e., aligned at top edge of lower case letter m]. At `scale=1`, the top edge of upper case letters is 10 pixels above the specified `y`, text baseline is 10 pixels below the specified `y`, and descenders go down to 20 pixels below the specified `y`.
310310

311311
* `sans`
@@ -341,6 +341,7 @@ display.text(text, x, y, wordwrap, scale, angle, spacing)
341341
* `scale` - size
342342
* `angle` - rotation angle (Vector only!)
343343
* `spacing` - letter spacing
344+
* `fixed_width` - space all characters equal distance apart (monospace)
344345

345346
Text scale can be a whole number (integer) for Bitmap fonts, or a decimal (float) for Vector (Hershey) fonts.
346347

@@ -355,7 +356,7 @@ Draws "Hello World" in a 16px tall, 2x scaled version of the `bitmap8` font.
355356
Sometimes you might want to measure a text string for centering or alignment on screen, you can do this with:
356357

357358
```python
358-
width = display.measure_text(text, scale, spacing)
359+
width = display.measure_text(text, scale, spacing, fixed_width)
359360
```
360361

361362
The height of each Bitmap font is explicit in its name.

0 commit comments

Comments
 (0)