Skip to content
Permalink
Browse files

Merge branch 'mixed-layer'

  • Loading branch information...
thep committed Dec 27, 2018
2 parents 11304e2 + 46cb620 commit 73b8abd2fb22744de83d097c9ee9adb9a32f951a
@@ -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>

Convert fontforge version string before comparing

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -11,6 +11,7 @@ FONTSOURCES = \
ArundinaSerif-Bold.sfd

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

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

if INCLUDE_OTF
otf_DATA = $(OTFFILES)
endif

if INCLUDE_PFB
type1_DATA = $(PFBFILES) $(AFMFILES)
endif
@@ -7,11 +7,13 @@ AC_INIT(fonts-sipa-arundina,
theppitak@gmail.com)
AM_INIT_AUTOMAKE(dist-xz no-dist-gzip -Wno-portability)

FONTFORGE_MIN_VER=20080110
FONTFORGE_MIN_VER=20170731

LATEX_PACKAGE="fonts-arundina"
AC_SUBST(LATEX_PACKAGE)

NEED_PYTHON="no"

# Check options
AC_ARG_ENABLE(ttf,
[AC_HELP_STRING([--disable-ttf],
@@ -28,11 +30,28 @@ if test "x$enable_ttf" = "xyes"; then
AC_SUBST(ttfdir)
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_HELP_STRING([--enable-pfb],
[enable Type1 PFB generation])],
, enable_pfb="no")
if test "x$enable_pfb" = "xyes"; then
NEED_PYTHON="yes"
AC_ARG_WITH(type1dir,
[AC_HELP_STRING([--with-type1dir=DIR],
[font directory in DIR [PREFIX/share/fonts/type1/t1-thai-arundina]])],
@@ -49,6 +68,7 @@ AC_ARG_ENABLE(latex,
, enable_latex="no")

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_LATEX,test $enable_latex = "yes")

@@ -72,6 +92,12 @@ else
AC_MSG_RESULT([$FONTFORGE_VER found, ok])
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
AC_CHECK_PROGS(AFM2TFM,afm2tfm,no)
if test "x$AFM2TFM" = "xno" ; then
@@ -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

@@ -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")

This file was deleted.

@@ -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")

This file was deleted.

@@ -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")
@@ -1,7 +1,10 @@
SUFFIXES: .sfd .ttf .afm .pfb
SUFFIXES: .sfd .ttf .otf .afm .pfb

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

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

%.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.
You can’t perform that action at this time.