Commit graph

304 commits

Author SHA1 Message Date
foamyguy
bcd7c653ec docstring fix for new sphinx 2021-01-07 18:40:36 -06:00
foamyguy
28b3879f5b fallback for builtin font 2021-01-07 18:21:25 -06:00
Jeff Epler
eaeed21773 label: Use new, optional 'ascent', 'descent' properties
Each time new glyphs have to be loaded from a font, it can take a long
time (hundreds of milliseconds).  In a parallel commit, 'ascent' and
'descent' properties will be added to BDF font objects, are essentially
free to compute, and are in any case much quicker than entering
load_glyphs.

This may change the layout of text slightly.  For instance, the height
of the "M" glyph in GothamBlack-50.bdf is 35, but the Ascent of the font
is 40 (and some characters, such as Å, are taller than the ascent at 45
pixels high)
2020-12-28 09:26:00 -06:00
Melissa LeBlanc-Williams
9bc4d2b5c8
Merge pull request #99 from FoamyGuy/wrapping
Wrapping helper function
2020-12-04 15:28:31 -07:00
Limor "Ladyada" Fried
f86e1afc94
Merge pull request #101 from FoamyGuy/add_magtag_example
Adding MagTag example
2020-11-22 15:43:32 -05:00
foamyguy
7fcd2065ac remove extra empty lines 2020-11-22 13:00:08 -06:00
foamyguy
62e7cdc584 adding magtag example 2020-11-22 12:59:37 -06:00
foamyguy
256380c71e fix words longer than max_chars 2020-11-21 19:10:48 -06:00
foamyguy
006fee4a6c black format 2020-11-16 22:03:05 -06:00
foamyguy
f3c565c359 add text wrapping helper function and example that uses it. 2020-11-16 21:47:53 -06:00
foamyguy
aedb89cc8c Merge remote-tracking branch 'origin/master' 2020-11-14 14:13:20 -06:00
foamyguy
ff7115131e
Merge pull request #98 from kmatch98/blank_text
Correct bug of modifying self rather than self.local_group when text …
2020-11-14 14:05:01 -06:00
Kevin Matocha
7f9dc63ed5 Fix long comment line for pylint 2020-11-14 13:30:44 -06:00
Kevin Matocha
1f42993525 Correct bug of modifying self rather than self.local_group when text is blank 2020-11-14 13:27:17 -06:00
foamyguy
0f337b892e
Merge pull request #2 from adafruit/master
merge from adafruit
2020-11-06 10:04:54 -06:00
foamyguy
957335cf9e
Merge pull request #96 from FoamyGuy/add_matrixportal_example
Add matrixportal example
2020-11-06 09:56:52 -06:00
foamyguy
856e6d2860 adding matrix portal example 2020-11-06 09:38:29 -06:00
foamyguy
2ab443f6e8
Merge pull request #1 from adafruit/master
merge from adafruit
2020-10-22 21:50:52 -05:00
foamyguy
0c57ae8728
Merge pull request #93 from eteq/add-init
add init
2020-10-19 18:08:56 -05:00
Erik Tollerud
6513a95867 add init 2020-10-17 23:59:24 -04:00
foamyguy
df94e2fbd9
Merge pull request #92 from kmatch98/bitmap_mutable
Correct documentation errors related to mutability
2020-09-05 13:25:14 -05:00
Kevin Matocha
444a8adb73 Correct documentation errors related to mutability 2020-09-05 11:35:28 -05:00
Scott Shawcroft
a836740924
Merge pull request #90 from kmatch98/bitmap_mutable
`bitmap_label`: Make text, line_spacing and scale mutable
2020-08-31 14:15:38 -07:00
Kevin Matocha
f23910cdce Breakout blit function, improve handling of builtin builtin bitmap.blit, add back kwargs passing to self Group instance 2020-08-28 15:34:01 -05:00
Kevin Matocha
4bab6cf4c0 Update docs file to include bitmap_label 2020-08-28 10:20:55 -05:00
Kevin Matocha
5d299cc0e8 ran black and pylint 2020-08-28 10:13:52 -05:00
Kevin Matocha
9ef676ef6d Fix scale bug in label.py, remove kwargs from both and add scale input parameter 2020-08-28 10:12:09 -05:00
Kevin Matocha
df1c8eafd2 fix bug with scale initialization 2020-08-27 16:48:06 -05:00
Kevin Matocha
98467964bf pylint fixes 2020-08-27 14:55:06 -05:00
Kevin Matocha
1a47464430 ran black and pylint updates 2020-08-27 14:45:35 -05:00
Kevin Matocha
7ca736f7e1 Add scale mutability, bug fix on blit range 2020-08-27 13:58:29 -05:00
Kevin Matocha
bece1ad28d Bug fix in try/except in _place_text 2020-08-26 14:07:49 -05:00
Kevin Matocha
a47afc06c2 Add try/except backward compatibility for bitmap.blit function in _place_text 2020-08-26 08:16:19 -05:00
Kevin Matocha
3e8f35f897 Added getter/setters for text, line_spacing and temporary fix for set_scale, some performance speedups by deleting duplication in bounding box calculations 2020-08-25 22:26:30 -05:00
Kevin Matocha
a404b09fd7 first commit with mutable text, font and line_spacing 2020-08-25 15:56:46 -05:00
foamyguy
9d28b6c6d1
Merge pull request #86 from kmatch98/many_cleanups
Bug fixes related to positioning and bounding box size
2020-08-22 10:27:47 -05:00
Kevin Matocha
59c9544605 Update font filename 2020-08-21 22:30:11 -05:00
Kevin Matocha
f83687c47a rearrange import statements for pylint 2020-08-21 22:26:59 -05:00
Kevin Matocha
61dac4d83d rename error variable name for pylint 2020-08-21 22:22:36 -05:00
Kevin Matocha
3f9ea73480 Add raise from for exception handling 2020-08-21 22:19:32 -05:00
Kevin Matocha
cf6d7130d0 Delete redundant + sign 2020-08-21 21:33:47 -05:00
Kevin Matocha
ec28d2a8ec Update header docs to previous release 2020-08-20 12:59:59 -05:00
Kevin Matocha
704744f417 remove whitespace 2020-08-20 12:53:29 -05:00
Kevin Matocha
1421c5d57e Update docs to try to solve unexpected-indentation 2020-08-20 12:10:21 -05:00
Kevin Matocha
7d70ca7a7f Update spacing in doc string 2020-08-20 12:05:35 -05:00
kmatch98
518cc0c45d
Merge branch 'master' into many_cleanups 2020-08-20 11:45:31 -05:00
Kevin Matocha
f37e66c2d3 Fix bugs with anchored_position and scaling 2020-08-20 11:37:11 -05:00
Jeff Epler
5ff8c19af7
Merge pull request #88 from FoamyGuy/fix_load_glyphs_for_builtin
gracefully recover if load_glpyhs does not exist on font we are using
2020-08-19 10:34:03 -05:00
FoamyGuy
3b03903091 gracefully recover if load_glpyhs does not exist on font we are using 2020-08-19 09:53:28 -05:00
foamyguy
54acb53d11
Merge pull request #83 from FoamyGuy/fix_anchored_position_rounding
Fix anchored position rounding
2020-08-18 13:55:23 -05:00