Skip to content

Commit 2d9d17f

Browse files
committed
Merge branch 'master' into fix/greek-subscript-small-letter
2 parents c958fe7 + 4eef843 commit 2d9d17f

4 files changed

Lines changed: 42 additions & 18 deletions

File tree

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are supported funding model platforms
22

3-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3+
github: [miiton]
44
patreon: miiton # Replace with a single Patreon username
55
open_collective: # Replace with a single Open Collective username
66
ko_fi: # Replace with a single Ko-fi username

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-latest
9+
steps:
10+
# Check out the source repository to standard location
11+
- name: Check out the repository
12+
uses: actions/checkout@v2
13+
14+
# Build a container in the root of our repository and make it run
15+
- name: Execute build
16+
uses: ./
17+
18+
# Upload built results as an artifact
19+
- name: Upload artifacts
20+
uses: actions/upload-artifact@v1
21+
with:
22+
name: Cica-nightly-${{ github.sha }}
23+
path: dist

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ENV MGENPLUS_VERSION 20150602
66
ENV NOTO_EMOJI_VERSION master
77
ENV DEJAVU_VERSION 2.37
88
ENV ICONSFORDEVS_VERSION master
9+
ENV CICA_SOURCE_FONTS_PATH /work/sourceFonts
910

1011
RUN apt-get update && \
1112
DEBIAN_FRONTEND=noninteractive apt-get -y install \

cica.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# DESCENT = 174
1313
ASCENT = 820
1414
DESCENT = 204
15-
SOURCE = './sourceFonts'
15+
SOURCE = os.getenv('CICA_SOURCE_FONTS_PATH', './sourceFonts')
1616
LICENSE = open('./LICENSE.txt').read()
1717
COPYRIGHT = open('./COPYRIGHT.txt').read()
18-
VERSION = '5.0.1'
18+
VERSION = '5.0.2'
1919
FAMILY = 'Cica'
2020

2121
fonts = [
@@ -91,11 +91,11 @@ def remove_glyph_from_hack(_font):
9191
def check_files():
9292
err = 0
9393
for f in fonts:
94-
if not os.path.isfile('./sourceFonts/%s' % f.get('hack')):
94+
if not os.path.isfile(os.path.join(SOURCE, f.get('hack'))):
9595
log('%s not exists.' % f)
9696
err = 1
9797

98-
if not os.path.isfile('./sourceFonts/%s' % f.get('mgen_plus')):
98+
if not os.path.isfile(os.path.join(SOURCE, f.get('mgen_plus'))):
9999
log('%s not exists.' % f)
100100
err = 1
101101

@@ -168,9 +168,9 @@ def add_dejavu(_f, conf):
168168
dejavu = None
169169
weight_name = conf.get('weight_name')
170170
if weight_name == "Regular":
171-
dejavu = fontforge.open('./sourceFonts/DejaVuSansMono.ttf')
171+
dejavu = fontforge.open(os.path.join(SOURCE, 'DejaVuSansMono.ttf'))
172172
elif weight_name == "Bold":
173-
dejavu = fontforge.open('./sourceFonts/DejaVuSansMono-Bold.ttf')
173+
dejavu = fontforge.open(os.path.join(SOURCE, 'DejaVuSansMono-Bold.ttf'))
174174

175175
for g in dejavu.glyphs():
176176
g.transform(psMat.compose(psMat.scale(0.45, 0.45), psMat.translate(-21, 0)))
@@ -459,10 +459,10 @@ def modify_WM(_f):
459459
return _f
460460

461461
def modify_m(_f, _weight):
462-
m = fontforge.open('./sourceFonts/m-Regular.sfd')
462+
m = fontforge.open(os.path.join(SOURCE, 'm-Regular.sfd'))
463463
if _weight == 'Bold':
464464
m.close()
465-
m = fontforge.open('./sourceFonts/m-Bold.sfd')
465+
m = fontforge.open(os.path.join(SOURCE, 'm-Bold.sfd'))
466466
m.selection.select(0x6d)
467467
m.copy()
468468
_f.selection.select(0x6d)
@@ -523,10 +523,10 @@ def fix_box_drawings(_f):
523523
return _f
524524

525525
def reiwa(_f, _weight):
526-
reiwa = fontforge.open('./sourceFonts/reiwa.sfd')
526+
reiwa = fontforge.open(os.path.join(SOURCE, 'reiwa.sfd'))
527527
if _weight == 'Bold':
528528
reiwa.close()
529-
reiwa = fontforge.open('./sourceFonts/reiwa-Bold.sfd')
529+
reiwa = fontforge.open(os.path.join(SOURCE, 'reiwa-Bold.sfd'))
530530
for g in reiwa.glyphs():
531531
if g.isWorthOutputting:
532532
reiwa.selection.select(0x00)
@@ -562,7 +562,7 @@ def fix_overflow(glyph):
562562
def import_svg(font):
563563
"""オリジナルのsvgグリフをインポートする
564564
"""
565-
files = glob.glob('sourceFonts/svg/*.svg')
565+
files = glob.glob(os.path.join(SOURCE, 'svg/*.svg'))
566566
for f in files:
567567
filename, _ = os.path.splitext(os.path.basename(f))
568568
g = font.createChar(int(filename, 16))
@@ -576,12 +576,12 @@ def import_svg(font):
576576

577577

578578
def build_font(_f, emoji):
579-
hack = fontforge.open('./sourceFonts/%s' % _f.get('hack'))
579+
hack = fontforge.open(os.path.join(SOURCE, _f.get('hack')))
580580
log('remove_glyph_from_hack()')
581581
hack = remove_glyph_from_hack(hack)
582-
cica = fontforge.open('./sourceFonts/%s' % _f.get('mgen_plus'))
583-
nerd = fontforge.open('./sourceFonts/nerd.sfd')
584-
icons_for_devs = fontforge.open('./sourceFonts/iconsfordevs.ttf')
582+
cica = fontforge.open(os.path.join(SOURCE, _f.get('mgen_plus')))
583+
nerd = fontforge.open(os.path.join(SOURCE, 'nerd.sfd'))
584+
icons_for_devs = fontforge.open(os.path.join(SOURCE, 'iconsfordevs.ttf'))
585585

586586

587587
log('transform Hack')
@@ -754,7 +754,7 @@ def build_font(_f, emoji):
754754

755755

756756
def add_notoemoji(_f):
757-
notoemoji = fontforge.open('./sourceFonts/NotoEmoji-Regular.ttf')
757+
notoemoji = fontforge.open(os.path.join(SOURCE, 'NotoEmoji-Regular.ttf'))
758758
for g in notoemoji.glyphs():
759759
if g.isWorthOutputting and g.encoding > 0x04f9:
760760
g.transform((0.42,0,0,0.42,0,0))
@@ -767,7 +767,7 @@ def add_notoemoji(_f):
767767
return _f
768768

769769
def add_gopher(_f):
770-
gopher = fontforge.open('./sourceFonts/gopher.sfd')
770+
gopher = fontforge.open(os.path.join(SOURCE, 'gopher.sfd'))
771771
for g in gopher.glyphs():
772772
if g.isWorthOutputting:
773773
gopher.selection.select(0x40)

0 commit comments

Comments
 (0)