Font sizes have been moved in to config file
This commit is contained in:
@@ -60,17 +60,24 @@ NotoSansCJK = fontpath+'NotoSansCJK/NotoSansCJKsc-'
|
||||
NotoSans = fontpath+'NotoSans/NotoSans-SemiCondensed'
|
||||
weatherfont = fontpath+'WeatherFont/weathericons-regular-webfont.ttf'
|
||||
|
||||
"""Fonts sizes"""
|
||||
agenda_font_size = 14
|
||||
calendar_font_size = 16
|
||||
rss_font_size = 14
|
||||
locales_font_size = 18
|
||||
weather_font_size = 12
|
||||
|
||||
"""Automatically select correct fonts to support set language"""
|
||||
if language in ['ja','zh','zh_tw','ko']:
|
||||
default = ImageFont.truetype(NotoSansCJK+'Regular.otf', 18)
|
||||
semi = ImageFont.truetype(NotoSansCJK+'Medium.otf', 18)
|
||||
bold = ImageFont.truetype(NotoSansCJK+'Bold.otf', 18)
|
||||
default = ImageFont.truetype(NotoSansCJK+'Regular.otf', locales_font_size)
|
||||
semi = ImageFont.truetype(NotoSansCJK+'Medium.otf', locales_font_size)
|
||||
bold = ImageFont.truetype(NotoSansCJK+'Bold.otf', locales_font_size)
|
||||
else:
|
||||
default = ImageFont.truetype(NotoSans+'.ttf', 18)
|
||||
semi = ImageFont.truetype(NotoSans+'Medium.ttf', 18)
|
||||
bold = ImageFont.truetype(NotoSans+'SemiBold.ttf', 18)
|
||||
default = ImageFont.truetype(NotoSans+'.ttf', locales_font_size)
|
||||
semi = ImageFont.truetype(NotoSans+'Medium.ttf', locales_font_size)
|
||||
bold = ImageFont.truetype(NotoSans+'SemiBold.ttf', locales_font_size)
|
||||
|
||||
w_font = ImageFont.truetype(weatherfont, 10)
|
||||
w_font = ImageFont.truetype(weatherfont, weather_font_size)
|
||||
|
||||
"""Create image with given parameters"""
|
||||
image = Image.new('RGB', (display_width, display_height), background_colour)
|
||||
|
Reference in New Issue
Block a user