Glyph clipped warnings using adafruit_display_text

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
alphabob
 
Posts: 24
Joined: Sun Dec 23, 2012 6:04 pm

Glyph clipped warnings using adafruit_display_text

Post by alphabob »

Hi,

I set up a Metro M4 Lite with TFT Cap Touch Display. It is using the Adafruit_CircuitPython_Display_Text library from github

The specific py code is from display_text_advance_example.py by Jose David M.

That demo is broken into two parts. The first part uses adafruit_display_text.label.Label to show strings. That seems to work just fine.

The second half uses adafruit_display_text.bitmap_label.Label to show strings. That works on the TFT display, but tosses a bunch of warning messages like:
Warning: Glyph clipped, exceeds descent property: "y"
Warning: Glyph clipped, exceeds Ascent property: "h"

While these are warnings, and the program seems to work OK, it's pretty annoying to have those pop up on the serial monitor as they often bump other meaningful messages off the screen.

Is there a way to suppress the warning?
Is there a way to avoid the clipping (perhaps another font)?

Thanks!

User avatar
neradoc
 
Posts: 542
Joined: Wed Apr 27, 2016 2:38 pm

Re: Glyph clipped warnings using adafruit_display_text

Post by neradoc »

Hi, I don't know what specifically causes that message (and how to chose a font to avoid it), but the library is not setup to allow silencing it unfortunately.
I'll see if we can do something about that.

You can get the python version of the library and modify it by removing the prints in it (search "print", replace the whole call with "pass").
You can get it from the py version of the bundle or the library's repository.

You could also try other fonts. I know of a repository of bdf fonts that are usable for small displays.
https://github.com/olikraus/u8g2/wiki/fntgrp
https://github.com/Neradoc/u8g2/tree/ma ... s/font/bdf

User avatar
alphabob
 
Posts: 24
Joined: Sun Dec 23, 2012 6:04 pm

Re: Glyph clipped warnings using adafruit_display_text

Post by alphabob »

Seems like every font produces the error, at least the five or so that I have in the fonts directory.

I did check out github and see the code.

I'm almost wondering if it might be an off by 1 error g.t. vs g.t or equal and l.t. vs l.t. or equal

I haven't worked on building a library yet, but will do soon - although I do hate to fork things.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”