Merge pull request #33 from aceisace/master

Master
This commit is contained in:
Ace 2019-05-14 20:34:47 +02:00 committed by GitHub
commit 4926035846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 5 deletions

View File

@ -39,10 +39,16 @@ from calibration import calibration
EPD_WIDTH = 640
EPD_HEIGHT = 384
default = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensedLight.ttf', 18)
semi = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensed.ttf', 18)
bold = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensedMedium.ttf', 18)
month_font = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensedLight.ttf', 40)
if language in ['ja','zh','zh_tw','ko']:
default = ImageFont.truetype(fpath+'NotoSansCJK/NotoSansCJKsc-Light.otf', 18)
semi = ImageFont.truetype(fpath+'NotoSansCJK/NotoSansCJKsc-DemiLight.otf', 18)
bold = ImageFont.truetype(fpath+'NotoSansCJK/NotoSansCJKsc-Regular.otf', 18)
month_font = ImageFont.truetype(fpath+'NotoSansCJK/NotoSansCJKsc-DemiLight.otf', 40)
else:
default = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensedLight.ttf', 18)
semi = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensed.ttf', 18)
bold = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensedMedium.ttf', 18)
month_font = ImageFont.truetype(fpath+'NotoSans/NotoSans-SemiCondensedLight.ttf', 40)
im_open = Image.open

View File

@ -187,6 +187,22 @@ body{
<input id="language_vi" type="radio" name="la">
<label for="language_vi">Vietnamese</label>
</div>
<div class="ts radio checkbox">
<input id="language_zh_tw" type="radio" name="la">
<label for="language_zh_tw">Chinese-Taiwanese</label>
</div>
<div class="ts radio checkbox">
<input id="language_zh" type="radio" name="la">
<label for="language_zh">Chinese</label>
</div>
<div class="ts radio checkbox">
<input id="language_ja" type="radio" name="la">
<label for="language_ja">Japanese</label>
</div>
<div class="ts radio checkbox">
<input id="language_ko" type="radio" name="la">
<label for="language_ko">Korean</label>
</div>
</div>
</div>
@ -223,7 +239,7 @@ body{
<div class="ts checkboxes">
<div class="ts radio checkbox">
<input id="Weather" type="radio" name="ts" checked>
<label for="Weather">Events from my iCalendar</label>
<label for="Weather">Weather</label>
</div>
<div class="ts radio checkbox">
<input id="top_blank" type="radio" name="ts">
@ -384,6 +400,18 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
if ($('#language_vi').is(':checked')){
language = "vi";
}
if ($('#language_zh_tw').is(':checked')){
language = "zh_tw";
}
if ($('#language_zh').is(':checked')){
language = "zh";
}
if ($('#language_ja').is(':checked')){
language = "ja";
}
if ($('#language_ko').is(':checked')){
language = "ko";
}
var units = "metric";
if ($('#imperial').is(':checked')){