Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ignore COMMENT lines no matter how many there are #48

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

Closed
wants to merge 1 commit into from

Conversation

eadgbear
Copy link

@eadgbear eadgbear commented Sep 1, 2021

No description provided.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Sep 1, 2021

Do you have a font file that has many comments within the first 10 lines that needs this modification in order to work? I've not ever run across a BDF font that had this issue. If you have one in mind please post a link here so it can be used for testing.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Dec 7, 2021

I tested this change using: https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font/blob/main/examples/bitmap_font_label_simpletest.py
on:

Adafruit CircuitPython 7.1.0-beta.0 on 2021-11-12; Adafruit PyPortal with samd51j20
Board ID:pyportal

Run the modified version from this per is raising an exception in that environment for me:

code.py output:
Traceback (most recent call last):
  File "code.py", line 24, in <module>
  File "/lib/adafruit_bitmap_font/bitmap_font.py", line 41, in load_font
  File "/lib/adafruit_bitmap_font/bdf.py", line 46, in __init__
  File "/lib/adafruit_bitmap_font/bdf.py", line 110, in _verify_bounding_box
Exception: Source file does not have the FOUNTBONDINGBOX parameter

It's odd because my font definitely does have the FOUNTBONDINGBOX line. The same font works successfully with the current release of this library.

I think possibly there is some logic error with the way this new while loop is interacting with the containing for loop.

@slyons did you do any testing on a CircuitPython device? Are you able to try running this example and see if you can work through what is causing the error?

@FoamyGuy
Copy link
Contributor

Closing this for now. We can re-open or make new PR in the future if needed.

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.

2 participants