Skip to content

Bitmap label ascent descent #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 30, 2021

Conversation

FoamyGuy
Copy link
Contributor

This implements the changes required in bitmap_label.py to use the ascent and descent feature which was recently added to Adafruit_CircuitPython_Bitmap_Font

The analogous PR for the regular label was #102

I tested on a PyPortal with this code:

import board
from displayio import Group
from adafruit_display_text import bitmap_label
from adafruit_bitmap_font import bitmap_font

font = bitmap_font.load_font("/fonts/forkawesome-36.pcf")
w,h,dx,dy = font.get_bounding_box()

glyphs = "".join(chr(0xf000 + i) for i in range(8))

group = Group()
label = bitmap_label.Label(font=font, text=glyphs, background_color=0x111111)
label.anchor_point = (0, 0)
label.anchored_position = (0,0)

group.append(label)
board.DISPLAY.show(group)
while True:
    pass

@FoamyGuy FoamyGuy requested a review from a team January 30, 2021 17:52
Copy link
Contributor

@jposada202020 jposada202020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in WIO terminal Using CP 6.0.1, with code included. works good.

Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No testing performed

@jepler jepler merged commit 2c2a403 into adafruit:master Jan 30, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 3, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_SCD30 to 2.0.1 from 2.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SCD30#7 from rpavlik/pressure-type

Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.7.0 from 1.6.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#58 from adafruit/dherrada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#59 from rsbohn/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.12.1 from 2.11.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#112 from jposada202020/updating-docs
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#110 from FoamyGuy/bitmap_label_ascent_descent

Updating https://github.com/adafruit/Adafruit_CircuitPython_Slideshow to 1.5.5 from 1.5.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_Slideshow#35 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_SimpleMath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants