mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
glcd: add pakenham.ttf as a seperate font
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9c53051956
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-06-28 (Sun, 28 Jun 2020)
Origin message was:
------------------
- glcd: add pakenham.ttf as a seperate font
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
installdir = $(FONTDIR)/oled
|
||||
|
||||
# NOTE: led.ttf is used for the LED clock in standby mode
|
||||
# lcd.ttf is used for the LCD clock in standby mode
|
||||
# pakenham.ttf is used for the temperature digits
|
||||
# terminator.ttf is used for the status markers
|
||||
|
||||
install_DATA = \
|
||||
led.ttf \
|
||||
lcd.ttf \
|
||||
pakenham.ttf \
|
||||
terminator.ttf
|
||||
|
BIN
data/oled/fonts/pakenham.ttf
Normal file
BIN
data/oled/fonts/pakenham.ttf
Normal file
Binary file not shown.
@@ -143,11 +143,11 @@ void WeatherUpdateFonts(void)
|
||||
{
|
||||
cGLCD *cglcd = cGLCD::getInstance();
|
||||
int fontsize_temperature = 0;
|
||||
int percent_temperature = std::min(24, 100);
|
||||
int percent_temperature = std::min(24, 100); // WTF?
|
||||
int fontsize_temperature_new = percent_temperature * cglcd->lcd->Height() / 100;
|
||||
if (!fonts_initialized || (fontsize_temperature_new != fontsize_temperature)) {
|
||||
fontsize_temperature = fontsize_temperature_new;
|
||||
if (!font_temperature.LoadFT2(FONTDIR "/pakenham.ttf", "UTF-8", fontsize_temperature)) {
|
||||
if (!font_temperature.LoadFT2(FONTDIR "/oled/pakenham.ttf", "UTF-8", fontsize_temperature)) {
|
||||
font_temperature.LoadFT2(g_settings.font_file, "UTF-8", fontsize_temperature);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user