88kacper8 / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

Optimize Fonts for Sketch Size for Arduino #274

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Include a few different fonts in a sketch
2. Compile and you will get "sketch to big"

(using Yun or Uno)

Are there any methods for reducing the library footprint for Arduino as there 
is very limited space for sketches?

Original issue reported on code.google.com by omar.aljadda@gmail.com on 18 Aug 2014 at 1:05

GoogleCodeExporter commented 8 years ago
You can remove unneeded chars explictly from the .bdf source and create your 
custom font with bdg2u8g. Also consider to use fonts with "r" and "n" at the 
end.

Will this help?

Original comment by olikr...@gmail.com on 18 Aug 2014 at 7:47

GoogleCodeExporter commented 8 years ago
Yes this helps thanks for the tip. I wondering, however, if I can somehow store 
the font data on the linux side (I'm using Arduino Yun). There is much more 
space to save the bits there...then Arduino could read font data at run time?

Original comment by omar.aljadda@gmail.com on 15 Sep 2014 at 3:05

GoogleCodeExporter commented 8 years ago
Of course this is thinkable, however difficult and will require complete 
rewriting of the font rendering procedures, because in this case, glyph data 
will be in RAM not in PROGMEM area. 

Original comment by olikr...@gmail.com on 15 Sep 2014 at 5:44

GoogleCodeExporter commented 8 years ago
Have you had any experience using a font chip? My display has a font chip but 
not sure how to drive it.

Original comment by omar.aljadda@gmail.com on 18 Sep 2014 at 10:13

GoogleCodeExporter commented 8 years ago
It would be a very specific solution. Most display controller do not support 
font chips (as far has i have seen this). 

Original comment by olikr...@gmail.com on 19 Sep 2014 at 4:34

GoogleCodeExporter commented 8 years ago
What about storing the font data on an EEPROM chip and accessing it using I2C?

Original comment by omar.aljadda@gmail.com on 25 Sep 2014 at 8:09

GoogleCodeExporter commented 8 years ago
In general, getting the font from a location othern than the internal flash 
rom, will require a special software solution. The best thing is to use a 
controller with a larger flash rom.

Original comment by olikr...@gmail.com on 25 Sep 2014 at 8:58

GoogleCodeExporter commented 8 years ago
Okay got it. Guess I'm just looking for the cheapest solution even if it 
involves more coding.

Original comment by omar.aljadda@gmail.com on 25 Sep 2014 at 11:18

GoogleCodeExporter commented 8 years ago
Well, please feel free to change the code by yourself. But i do not have the 
resources to do so.

Original comment by olikr...@gmail.com on 26 Sep 2014 at 6:56

GoogleCodeExporter commented 8 years ago
as discussed, this project can not handle this.

Original comment by olikr...@gmail.com on 13 Dec 2014 at 5:01