Merge pull request #52 from aceisace/fontsize-adjustment
Fontsize Adjustment
This commit is contained in:
commit
83a2645e49
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -152,7 +152,7 @@ def to_hours(datetime_object, simple = False):
|
|||||||
|
|
||||||
"""Choose font optimised for the weather section"""
|
"""Choose font optimised for the weather section"""
|
||||||
fontsize = 8
|
fontsize = 8
|
||||||
font = ImageFont.truetype(NotoSans+'.ttf', fontsize)
|
font = ImageFont.truetype(NotoSans+'Medium.ttf', fontsize)
|
||||||
fill_height = 0.8
|
fill_height = 0.8
|
||||||
|
|
||||||
while font.getsize('hg')[1] <= (row_height * fill_height):
|
while font.getsize('hg')[1] <= (row_height * fill_height):
|
||||||
|
@ -53,15 +53,13 @@ weatherfont = fontpath+'WeatherFont/weathericons-regular-webfont.ttf'
|
|||||||
|
|
||||||
"""Automatically select correct fonts to support set language"""
|
"""Automatically select correct fonts to support set language"""
|
||||||
if language in ['ja','zh','zh_tw','ko']:
|
if language in ['ja','zh','zh_tw','ko']:
|
||||||
default = ImageFont.truetype(NotoSansCJK+'Light.otf', 18)
|
default = ImageFont.truetype(NotoSansCJK+'Regular.otf', 18)
|
||||||
semi = ImageFont.truetype(NotoSansCJK+'DemiLight.otf', 18)
|
semi = ImageFont.truetype(NotoSansCJK+'Medium.otf', 18)
|
||||||
bold = ImageFont.truetype(NotoSansCJK+'Regular.otf', 18)
|
bold = ImageFont.truetype(NotoSansCJK+'Bold.otf', 18)
|
||||||
month_font = ImageFont.truetype(NotoSansCJK+'DemiLight.otf', 40)
|
|
||||||
else:
|
else:
|
||||||
default = ImageFont.truetype(NotoSans+'Light.ttf', 18)
|
default = ImageFont.truetype(NotoSans+'.ttf', 18)
|
||||||
semi = ImageFont.truetype(NotoSans+'.ttf', 18)
|
semi = ImageFont.truetype(NotoSans+'Medium.ttf', 18)
|
||||||
bold = ImageFont.truetype(NotoSans+'Medium.ttf', 18)
|
bold = ImageFont.truetype(NotoSans+'SemiBold.ttf', 18)
|
||||||
month_font = ImageFont.truetype(NotoSans+'Light.ttf', 40)
|
|
||||||
|
|
||||||
w_font = ImageFont.truetype(weatherfont, 10)
|
w_font = ImageFont.truetype(weatherfont, 10)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user