Skip to content

Commit

Permalink
adds curve font "Source Han Sans" offering CN, TW, KR, JP character s…
Browse files Browse the repository at this point in the history
…ets and "WenQuanYi Zen Hei" offering CN and TW character sets (Issue #493)
  • Loading branch information
MAKOMO committed Jul 26, 2020
1 parent 2c977f0 commit 835520a
Show file tree
Hide file tree
Showing 47 changed files with 11,788 additions and 11,786 deletions.
2 changes: 2 additions & 0 deletions src/artisan-win.spec
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ for fn in [
'artisanSettings.ico',
'artisanWheel.ico',
r'includes\Humor-Sans.ttf',
r'includes\SourceHanSans.ttc',
r'includes\wqy-zenhei.ttc',
r'includes\alarmclock.eot',
r'includes\alarmclock.svg',
r'includes\alarmclock.ttf',
Expand Down
12 changes: 5 additions & 7 deletions src/artisanlib/curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,11 @@ def __init__(self, parent = None, aw = None):
fontlabel = QLabel(QApplication.translate("Label", "Font",None))
self.GraphFont = QComboBox()
# no Comic on Linux!
if platform.system() == "Linux":
self.GraphFont.addItems([QApplication.translate("ComboBox","Default",None),
QApplication.translate("ComboBox","Humor",None)])
else:
self.GraphFont.addItems([QApplication.translate("ComboBox","Default",None),
QApplication.translate("ComboBox","Humor",None),
QApplication.translate("ComboBox","Comic",None)])
self.GraphFont.addItems([QApplication.translate("ComboBox","Default",None),
"Humor",
"Comic",
"Source Han Sans",
"WenQuanYi Zen Hei"])
self.GraphFont.setCurrentIndex(self.aw.qmc.graphfont)
self.GraphFont.currentIndexChanged.connect(self.changeGraphFont)
graphLayout = QHBoxLayout()
Expand Down
13 changes: 11 additions & 2 deletions src/artisanlib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18803,8 +18803,17 @@ def setFonts(self,redraw=True):
# self.mpl_fontproperties = mpl.font_manager.FontProperties()
except Exception:
pass
# no Comic on Linux!
elif self.qmc.graphfont == 1 or platf == "Linux":
elif self.qmc.graphfont == 3: # Source Han Sans (TW, CN, KR, JP)
# font Source Han Sans selected
rcParams['font.size'] = 12.0
rcParams['font.family'] = ['Source Han Sans']
aw.set_mpl_fontproperties(self.getResourcePath() + "SourceHanSans.ttc")
elif self.qmc.graphfont == 4: # WenQuanYi Zen Hei
# font WenQuanYi selected
rcParams['font.size'] = 12.0
rcParams['font.family'] = ['WenQuanYi Zen Hei']
aw.set_mpl_fontproperties(self.getResourcePath() + "wqy-zenhei.ttc")
elif self.qmc.graphfont == 1 or platf == "Linux": # no Comic on Linux!
# font Humor selected
rcParams['font.size'] = 16.0
if platf == 'Linux':
Expand Down
1 change: 1 addition & 0 deletions src/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ cp artisan-athm.xml dist
cp artisan-aset.xml dist
cp artisan-wg.xml dist
cp includes/Humor-Sans.ttf dist
cp includes/SourceHanSans.ttc dist
cp includes/alarmclock.eot dist
cp includes/alarmclock.svg dist
cp includes/alarmclock.ttf dist
Expand Down
1 change: 1 addition & 0 deletions src/build-mac3-pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ cp includes/report-template.htm dist/Artisan.app/Contents/Resources
cp includes/roast-template.htm dist/Artisan.app/Contents/Resources
cp includes/ranking-template.htm dist/Artisan.app/Contents/Resources
cp includes/Humor-Sans.ttf dist/Artisan.app/Contents/Resources
cp includes/SourceHanSans.ttc dist/Artisan.app/Contents/Resources
cp includes/jquery-1.11.1.min.js dist/Artisan.app/Contents/Resources


Expand Down
1 change: 1 addition & 0 deletions src/build-rpi2-pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ cp artisan-apal.xml dist
cp artisan-aset.xml dist
cp artisan-wg.xml dist
cp includes/Humor-Sans.ttf dist
cp includes/SourceHanSans.ttc dist
cp includes/alarmclock.eot dist
cp includes/alarmclock.svg dist
cp includes/alarmclock.ttf dist
Expand Down
2 changes: 2 additions & 0 deletions src/setup-install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ Section Uninstall
Delete "$INSTDIR\artisanWheel.ico"
Delete "$INSTDIR\artisanSettings.ico"
Delete "$INSTDIR\Humor-Sans.ttf"
Delete "$INSTDIR\SourceHanSans.ttc"
Delete "$INSTDIR\wqy-zenhei.ttc"
Delete "$INSTDIR\alarmclock.eot"
Delete "$INSTDIR\alarmclock.svg"
Delete "$INSTDIR\alarmclock.ttf"
Expand Down
2 changes: 2 additions & 0 deletions src/setup-install3-pi.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ Section Uninstall
Delete "$INSTDIR\artisanWheel.ico"
Delete "$INSTDIR\artisanSettings.ico"
Delete "$INSTDIR\Humor-Sans.ttf"
Delete "$INSTDIR\SourceHanSans.ttc"
Delete "$INSTDIR\wqy-zenhei.ttc"
Delete "$INSTDIR\alarmclock.eot"
Delete "$INSTDIR\alarmclock.svg"
Delete "$INSTDIR\alarmclock.ttf"
Expand Down
2 changes: 2 additions & 0 deletions src/setup-install3.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ Section Uninstall
Delete "$INSTDIR\artisanWheel.ico"
Delete "$INSTDIR\artisanSettings.ico"
Delete "$INSTDIR\Humor-Sans.ttf"
Delete "$INSTDIR\SourceHanSans.ttc"
Delete "$INSTDIR\wqy-zenhei.ttc"
Delete "$INSTDIR\alarmclock.eot"
Delete "$INSTDIR\alarmclock.svg"
Delete "$INSTDIR\alarmclock.ttf"
Expand Down
2 changes: 2 additions & 0 deletions src/setup-mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def my_parse_makefile(filename, g):
("../Resources", [r"includes/roast-template.htm"]),
("../Resources", [r"includes/ranking-template.htm"]),
("../Resources", [r"includes/Humor-Sans.ttf"]),
("../Resources", [r"includes/SourceHanSans.ttc"]),
("../Resources", [r"includes/wqy-zenhei.ttc"]),
("../Resources", [r"includes/jquery-1.11.1.min.js"]),
("../Resources", [r"includes/Machines"]),
("../Resources", [r"includes/Themes"]),
Expand Down
4 changes: 3 additions & 1 deletion src/setup-mac3.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@
("../Resources", [r"includes/roast-template.htm"]),
("../Resources", [r"includes/ranking-template.htm"]),
("../Resources", [r"includes/Humor-Sans.ttf"]),
("../Resources", [r"includes/SourceHanSans.ttc"]),
("../Resources", [r"includes/wqy-zenhei.ttc"]),
("../Resources", [r"includes/jquery-1.11.1.min.js"]),
("../Resources", [r"includes/Machines"]),
("../Resources", [r"includes/Themes"]),
Expand Down Expand Up @@ -367,4 +369,4 @@
subprocess.check_call(r"rm -f artisan-mac-" + VERSION + r".dmg",shell = True)
subprocess.check_call(r'hdiutil create artisan-mac-' + VERSION + r'.dmg -volname "artisan" -fs HFS+ -srcfolder "dist"',shell = True)
# otool -L dist/Artisan.app/Contents/MacOS/Artisan
#
# ("../Resources", [r"includes/SourceHanSans.ttc"]),
2 changes: 2 additions & 0 deletions src/setup-win.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ def numpy_dll_paths_fix():
os.system(r'copy artisanTheme.ico dist')
os.system(r'copy artisanWheel.ico dist')
os.system(r'copy includes\\Humor-Sans.ttf dist')
os.system(r'copy includes\\SourceHanSans.ttc dist')
os.system(r'copy includes\\wqy-zenhei.ttc dist')
os.system(r'copy includes\\alarmclock.eot dist')
os.system(r'copy includes\\alarmclock.svg dist')
os.system(r'copy includes\\alarmclock.ttf dist')
Expand Down
2 changes: 2 additions & 0 deletions src/setup-win3.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
os.system('copy artisanTheme.ico dist')
os.system('copy artisanWheel.ico dist')
os.system('copy includes\\Humor-Sans.ttf dist')
os.system('copy includes\\SourceHanSans.ttc dist')
os.system('copy includes\\wqy-zenhei.ttc dist')
os.system('copy includes\\alarmclock.eot dist')
os.system('copy includes\\alarmclock.svg dist')
os.system('copy includes\\alarmclock.ttf dist')
Expand Down
2 changes: 2 additions & 0 deletions src/setup-win35.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@

for e in [
'Humor-Sans.ttf',
'SourceHanSans.ttc',
'wqy-zenhei.ttc',
'alarmclock.eot',
'alarmclock.svg',
'alarmclock.ttf',
Expand Down
Binary file modified src/translations/artisan_ar.qm
Binary file not shown.
Loading

0 comments on commit 835520a

Please sign in to comment.