This repository has been archived by the owner on Dec 20, 2018. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
this is a "POC" of simple, but effective font compression already implemented on of my project; please check also original repository (https://github.com/eltomjan/Adafruit_ILI9340) - do not know how to propagate latest changes to this request.
You can see results on my https://github.com/eltomjan/ETEhomeTools or test on Windows port in https://github.com/eltomjan/ETEhomeTools/tree/master/ArduinoSimulator, there is also Win build EXE https://github.com/eltomjan/ETEhomeTools/raw/master/ArduinoSimulator/ArduinoSimulatorEXE.zip of this demo.
I found fonts I am using are a bit bigger if XORed by both axes, but it should be quite random, so I left optional row xor logic in place.
I have changed also GFX, etc. 4 my project - I am printing same way like clear screen, so there is way better print speed (as SPI data are significantly reduced).
There is also option to print font as proportional, also write return pixel width instead of char's no 4 proportional.
Older version run on Pololu - A-Star 32U4 Micro, but latest changes were made & tested in simulator and then merged to original version.
If you prefer simple Arduino cage test, there is also a Cage.cpp in my Simulator, that should work in Arduino directly (if few related files from Simulator folder are included).
In case you want to create or import different fonts, there is also a cmd tool fntXorPacker.cpp (fntXorPacker was a main originally, but the renamed as I placed test parameters 2 different main calling that function).
It has GLCD, ASCII and "own" XORed fonts import options (GLCD & XORed are read as = {data} array from include file) , export only as XORed, but with huge comment showing whole proces, etc. (ASCII original, XORed, row bitmap bit 4 each row, column bitmap in case there are any data in the row, ASCII bytes again with dots instead of zeros and hexa non-zero data in output for particular row bytes).
Then ASCII part (even full comment content from XORed) could be used to (edit?) & read font again.
I am open to any questions/comments or improvements ;-)
Fonts could be switched, but I am using only one size for each font.
BR,
El Tom
P.S. For testing GLCD font import this project used https://github.com/andygock/glcd (planning to propose XORed export there too).