interactiveinstitute / elvis

Educational tool for measuring energy usage with Fibaro Wall Plugs on Raspberry Pi
https://www.tii.se/projects/energy-in-a-box-at-komtek
GNU General Public License v3.0
3 stars 0 forks source link

On the RPi image, replace DejaVu Sans by FreeSans #37

Closed sander closed 10 years ago

sander commented 10 years ago

Looking at the node-openvg-canvas source code, it seems that only DejaVu Sans is supported. FreeSans looks nicer here and is installed by default on Raspberry Pi. It’s a bit hacky but this should work:

cd /usr/share/fonts/truetype/ttf-dejavu
mv DejaVuSans.ttf DejaVuSans.ttf.bak
mv DejaVuSans-Bold.ttf DejaVuSans-Bold.ttf.bak
cp ../freefont/FreeSans.ttf DejaVuSans.ttf
cp ../freefont/FreeSans-Bold.ttf DejaVuSans-Bold.ttf

@Anton04 could you do this for the RPi image that will be used?

sander commented 10 years ago

Using DejaVu Sans, the colours in the colour key overlap the numbers as noticed by @rebekahlolsen. The font change described above should fix this.

Anton04 commented 10 years ago

To run updates that fixes this fist login to the rpi and then run:

sudo ~/git/watt-lite-twist-lite/updates/ChangeFonts

The UpdateFonts script replaces the fonts in accordance with Sanders fix but also checks if its previously been run. If it has already been applied it does nothing.