-
Notifications
You must be signed in to change notification settings - Fork 121
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
Allow space character (ascii 32) in all fonts #100
base: master
Are you sure you want to change the base?
Conversation
If a font does not have an encoding for the space character, it will normally be skipped and nothing is printed. Calling alwaysAllowSpace(true) causes the space character to be printed for all fonts. The width of the space character will be the FONT_WIDTH of the font.
Hi, from a recent pull request:
(link to the message) |
I will put it on my list. May be a long time if I decide to do it. |
Yes, that was my pull request, and I don't understand the purpose of that comment. Does it mean that:
I am using the GitHub Pull Request as a tool for communicating the proposed change. If the maintainer does not want to receive PRs, it would be useful to write that explicitly in the README.md. |
It means that pull request will not be merged. Check the link I attached bellow the quote. |
I decided to add non-font space. Here is a zip with my mod. Please test it. Here is the diff:
I decided to have it enabled by default since it only adds a few bytes. Here is my test program:
Edit: I compared program size with |
It works fine. You have a bunch of trailing whitespaces that you probably want to remove. Are you going to require |
I plan to just define ENABLE_NONFONT_SPACE in SSD1306Ascii.h with:
I don't think many people will need to disable it since the feature take about 32 bytes of flash in AVR and is only is invoked for fonts without a space and only the user writes a space. The trailing whitespaces will vanish and the format may change when I use clang-format. Also I will make any changes found by cppcheck or Google cpplint. I may put all option |
If a font does not have an encoding for the space character, it will normally be skipped and nothing is printed. Calling
alwaysAllowSpace(true)
causes the space character to be printed for all fonts. The width of the space character will be the FONT_WIDTH of the font.Additional PR Notes
I wonder if you would consider merging this feature. I've been carrying this patch in my fork for a few years. With the recent change to MIT License, I'd like to upstream it to eliminate the
git rebase
conflicts that I sometimes have to deal with.This will be most useful for fixed-sized fonts when: (1) Printing numbers which are right-justified with leading spaces instead of leading zeros; (2) Blinking letters by overwriting them with the space character.