Skip to content

Commit

Permalink
Merge branch 'mixed-layer'
Browse files Browse the repository at this point in the history
  • Loading branch information
thep committed Dec 27, 2018
2 parents 11304e2 + 46cb620 commit 73b8abd
Show file tree
Hide file tree
Showing 20 changed files with 95,192 additions and 11,708 deletions.
58 changes: 58 additions & 0 deletions ChangeLog
@@ -1,3 +1,61 @@
2018-12-27 Theppitak Karoonboonyanan <theppitak@gmail.com>

Generate Type 1 and OTF fonts from Cube layer

With this, we have to use Fontforge's Python scripting
to access 'Cube' layer when generating.

* configure.ac:
- Add '--enable-otf' option
- Check for 'fontforge' Python module when needed
* scripts/Makefile.am, +scripts/gen-otf.py,
-scripts/gen-pfa.pe, +scripts/gen-pfa.py,
-scripts/gen-pfb.pe, +scripts/gen-pfb.py:
- Add 'gen-otf.py' for OTF generation
- Replace 'gen-[pfa,pfb].pe' with 'gen-[pfa,pfb].py'
* scripts/gen.mk:
- Add rule for OTF generation
- Call Python script instead of Fontforge native script
when generating PFB
* arundina/Makefile.am:
- Add OTF target

2018-12-27 Theppitak Karoonboonyanan <theppitak@gmail.com>

Serif: Add Cube layer with cubic splines

* arundina/ArundinaSerif[-Bold].sfd:
- Add new cubic foreground layer 'Cube'.
- Copy glyphs from 'Fore' layer to 'Cube' layer.
- Simplify cubic splines.
- Use vertical-horizontal points at extremas.
- Apply AutoHint
- Bump font version to 3.00

2018-12-20 Theppitak Karoonboonyanan <theppitak@gmail.com>

SansMono: Add Cube layer with cubic splines

* arundina/ArundinaSansMono[-*].sfd:
- Add new cubic foreground layer 'Cube'.
- Copy glyphs from 'Fore' layer to 'Cube' layer.
- Simplify cubic splines.
- Use vertical-horizontal points at extremas.
- Apply AutoHint
- Bump font version to 2.00

2018-11-30 Theppitak Karoonboonyanan <theppitak@gmail.com>

Sans: Add Cube layer with cubic splines

* arundina/ArundinaSans[-*].sfd:
- Add new cubic foreground layer 'Cube'.
- Copy glyphs from 'Fore' layer to 'Cube' layer.
- Add extremas & simplify cubic splines.
- Use vertical-horizontal points at extremas.
- Apply AutoHint
- Bump font version to 2.00

2018-03-12 Theppitak Karoonboonyanan <theppitak@gmail.com> 2018-03-12 Theppitak Karoonboonyanan <theppitak@gmail.com>


Convert fontforge version string before comparing Convert fontforge version string before comparing
Expand Down
11,400 changes: 9,848 additions & 1,552 deletions arundina/ArundinaSans-Bold.sfd

Large diffs are not rendered by default.

11,025 changes: 9,904 additions & 1,121 deletions arundina/ArundinaSans-BoldOblique.sfd

Large diffs are not rendered by default.

10,872 changes: 9,867 additions & 1,005 deletions arundina/ArundinaSans-Oblique.sfd

Large diffs are not rendered by default.

10,833 changes: 9,466 additions & 1,367 deletions arundina/ArundinaSans.sfd

Large diffs are not rendered by default.

9,182 changes: 8,102 additions & 1,080 deletions arundina/ArundinaSansMono-Bold.sfd

Large diffs are not rendered by default.

10,932 changes: 9,783 additions & 1,149 deletions arundina/ArundinaSansMono-BoldOblique.sfd

Large diffs are not rendered by default.

10,895 changes: 9,718 additions & 1,177 deletions arundina/ArundinaSansMono-Oblique.sfd

Large diffs are not rendered by default.

9,087 changes: 8,012 additions & 1,075 deletions arundina/ArundinaSansMono.sfd

Large diffs are not rendered by default.

11,161 changes: 10,111 additions & 1,050 deletions arundina/ArundinaSerif-Bold.sfd

Large diffs are not rendered by default.

11,370 changes: 10,252 additions & 1,118 deletions arundina/ArundinaSerif.sfd

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions arundina/Makefile.am
Expand Up @@ -11,6 +11,7 @@ FONTSOURCES = \
ArundinaSerif-Bold.sfd ArundinaSerif-Bold.sfd


TTFFILES = $(FONTSOURCES:.sfd=.ttf) TTFFILES = $(FONTSOURCES:.sfd=.ttf)
OTFFILES = $(FONTSOURCES:.sfd=.otf)
AFMFILES = $(FONTSOURCES:.sfd=.afm) AFMFILES = $(FONTSOURCES:.sfd=.afm)
PFBFILES = $(FONTSOURCES:.sfd=.pfb) PFBFILES = $(FONTSOURCES:.sfd=.pfb)


Expand All @@ -22,6 +23,10 @@ if INCLUDE_TTF
ttf_DATA = $(TTFFILES) ttf_DATA = $(TTFFILES)
endif endif


if INCLUDE_OTF
otf_DATA = $(OTFFILES)
endif

if INCLUDE_PFB if INCLUDE_PFB
type1_DATA = $(PFBFILES) $(AFMFILES) type1_DATA = $(PFBFILES) $(AFMFILES)
endif endif
Expand Down
28 changes: 27 additions & 1 deletion configure.ac
Expand Up @@ -7,11 +7,13 @@ AC_INIT(fonts-sipa-arundina,
theppitak@gmail.com) theppitak@gmail.com)
AM_INIT_AUTOMAKE(dist-xz no-dist-gzip -Wno-portability) AM_INIT_AUTOMAKE(dist-xz no-dist-gzip -Wno-portability)


FONTFORGE_MIN_VER=20080110 FONTFORGE_MIN_VER=20170731


LATEX_PACKAGE="fonts-arundina" LATEX_PACKAGE="fonts-arundina"
AC_SUBST(LATEX_PACKAGE) AC_SUBST(LATEX_PACKAGE)


NEED_PYTHON="no"

# Check options # Check options
AC_ARG_ENABLE(ttf, AC_ARG_ENABLE(ttf,
[AC_HELP_STRING([--disable-ttf], [AC_HELP_STRING([--disable-ttf],
Expand All @@ -28,11 +30,28 @@ if test "x$enable_ttf" = "xyes"; then
AC_SUBST(ttfdir) AC_SUBST(ttfdir)
fi fi


AC_ARG_ENABLE(otf,
[AC_HELP_STRING([--enable-otf],
[enable OTF generation])],
, enable_otf="no")
if test "x$enable_otf" = "xyes"; then
NEED_PYTHON="yes"
AC_ARG_WITH(otfdir,
[AC_HELP_STRING([--with-otfdir=DIR],
[font directory in DIR [PREFIX/share/fonts/opentype/arundina]])],
[otfdir="$withval"], [otfdir=\$\{prefix\}/share/fonts/opentype/arundina])
AC_MSG_CHECKING(--with-otfdir)
AC_MSG_RESULT("$otfdir")

AC_SUBST(otfdir)
fi

AC_ARG_ENABLE(pfb, AC_ARG_ENABLE(pfb,
[AC_HELP_STRING([--enable-pfb], [AC_HELP_STRING([--enable-pfb],
[enable Type1 PFB generation])], [enable Type1 PFB generation])],
, enable_pfb="no") , enable_pfb="no")
if test "x$enable_pfb" = "xyes"; then if test "x$enable_pfb" = "xyes"; then
NEED_PYTHON="yes"
AC_ARG_WITH(type1dir, AC_ARG_WITH(type1dir,
[AC_HELP_STRING([--with-type1dir=DIR], [AC_HELP_STRING([--with-type1dir=DIR],
[font directory in DIR [PREFIX/share/fonts/type1/t1-thai-arundina]])], [font directory in DIR [PREFIX/share/fonts/type1/t1-thai-arundina]])],
Expand All @@ -49,6 +68,7 @@ AC_ARG_ENABLE(latex,
, enable_latex="no") , enable_latex="no")


AM_CONDITIONAL(INCLUDE_TTF,test $enable_ttf = "yes") AM_CONDITIONAL(INCLUDE_TTF,test $enable_ttf = "yes")
AM_CONDITIONAL(INCLUDE_OTF,test $enable_otf = "yes")
AM_CONDITIONAL(INCLUDE_PFB,test $enable_pfb = "yes") AM_CONDITIONAL(INCLUDE_PFB,test $enable_pfb = "yes")
AM_CONDITIONAL(INCLUDE_LATEX,test $enable_latex = "yes") AM_CONDITIONAL(INCLUDE_LATEX,test $enable_latex = "yes")


Expand All @@ -72,6 +92,12 @@ else
AC_MSG_RESULT([$FONTFORGE_VER found, ok]) AC_MSG_RESULT([$FONTFORGE_VER found, ok])
fi fi


if test "x$NEED_PYTHON" = "xyes"; then
AM_PATH_PYTHON([2.7])
AX_PYTHON_MODULE([fontforge],[fatal],[python])
fi


if test "x$enable_latex" = "xyes"; then if test "x$enable_latex" = "xyes"; then
AC_CHECK_PROGS(AFM2TFM,afm2tfm,no) AC_CHECK_PROGS(AFM2TFM,afm2tfm,no)
if test "x$AFM2TFM" = "xno" ; then if test "x$AFM2TFM" = "xno" ; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/Makefile.am
@@ -1,2 +1,2 @@
EXTRA_DIST = gen-ttf.pe gen-pfa.pe gen-pfb.pe gen.mk EXTRA_DIST = gen-ttf.pe gen-otf.py gen-pfa.py gen-pfb.py gen.mk


11 changes: 11 additions & 0 deletions scripts/gen-otf.py
@@ -0,0 +1,11 @@
#!/usr/bin/env python

import sys
import os
import fontforge

sfd_file = sys.argv[1]
otf_file = os.path.basename(sfd_file).replace(".sfd", ".otf")

f = fontforge.open(sfd_file)
f.generate(otf_file, layer="Cube")
2 changes: 0 additions & 2 deletions scripts/gen-pfa.pe

This file was deleted.

11 changes: 11 additions & 0 deletions scripts/gen-pfa.py
@@ -0,0 +1,11 @@
#!/usr/bin/env python

import sys
import os
import fontforge

sfd_file = sys.argv[1]
pfa_file = os.path.basename(sfd_file).replace(".sfd", ".pfa")

f = fontforge.open(sfd_file)
f.generate(pfa_file, layer="Cube")
8 changes: 0 additions & 8 deletions scripts/gen-pfb.pe

This file was deleted.

11 changes: 11 additions & 0 deletions scripts/gen-pfb.py
@@ -0,0 +1,11 @@
#!/usr/bin/env python

import sys
import os
import fontforge

sfd_file = sys.argv[1]
pfb_file = os.path.basename(sfd_file).replace(".sfd", ".pfb")

f = fontforge.open(sfd_file)
f.generate(pfb_file, layer="Cube")
7 changes: 5 additions & 2 deletions scripts/gen.mk
@@ -1,7 +1,10 @@
SUFFIXES: .sfd .ttf .afm .pfb SUFFIXES: .sfd .ttf .otf .afm .pfb


%.ttf: %.sfd %.ttf: %.sfd
$(FONTFORGE) -script $(top_srcdir)/scripts/gen-ttf.pe $< $(FONTFORGE) -script $(top_srcdir)/scripts/gen-ttf.pe $<


%.otf: %.sfd
$(top_srcdir)/scripts/gen-otf.py $<

%.afm %.pfb: %.sfd %.afm %.pfb: %.sfd
$(FONTFORGE) -script $(top_srcdir)/scripts/gen-pfb.pe $< $(top_srcdir)/scripts/gen-pfb.py $<

0 comments on commit 73b8abd

Please sign in to comment.