Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ハイフン系のグリフを独自に作成 #78

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
tmp/*
sourceFonts/*
!sourceFonts/svg
Cica/*
.DS_Store
*.orig
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

ENV HACK_VERSION v3.003
ENV MGENPLUS_VERSION 20150602
ENV NOTO_EMOJI_VERSION main
ENV DEJAVU_VERSION 2.37
ENV ICONSFORDEVS_VERSION master
ENV CICA_SOURCE_FONTS_PATH /work/sourceFonts
ENV LANG ja_JP.UTF-8

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
software-properties-common fontforge unar git curl && \
software-properties-common fontforge unar git curl language-pack-ja && \
mkdir /work
WORKDIR /work
COPY sourceFonts sourceFonts
Expand Down
20 changes: 10 additions & 10 deletions cica.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,6 @@ def vertical_line_to_broken_bar(_f):
_f.paste()
return _f

def emdash_to_broken_dash(_f):
_f.selection.select(0x006c)
_f.copy()
_f.selection.select(0x2014)
_f.pasteInto()
_f.intersect()
return _f

def mathglyph_to_double(_f):
pass

Expand Down Expand Up @@ -565,7 +557,16 @@ def fix_overflow(glyph):
def import_svg(font):
"""オリジナルのsvgグリフをインポートする
"""
files = glob.glob(os.path.join(SOURCE, 'svg/*.svg'))
files = glob.glob(os.path.join(SOURCE, 'svg/single/*.svg'))
for f in files:
filename, _ = os.path.splitext(os.path.basename(f))
g = font.createChar(int(filename, 16))
g.clear()
g.importOutlines(f)
g.width = 512
g.vwidth = 512

files = glob.glob(os.path.join(SOURCE, 'svg/double/*.svg'))
for f in files:
filename, _ = os.path.splitext(os.path.basename(f))
g = font.createChar(int(filename, 16))
Expand Down Expand Up @@ -684,7 +685,6 @@ def build_font(_f, emoji):
cica = zero(cica)
cica = modify_WM(cica)
cica = vertical_line_to_broken_bar(cica)
cica = emdash_to_broken_dash(cica)
cica = reiwa(cica, _f.get('weight_name'))
cica = add_gopher(cica)
cica = modify_ellipsis(cica)
Expand Down
3 changes: 3 additions & 0 deletions sourceFonts/svg/double/2010.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions sourceFonts/svg/double/2011.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions sourceFonts/svg/double/2012.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions sourceFonts/svg/double/2013.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions sourceFonts/svg/double/2014.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions sourceFonts/svg/double/2015.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes