diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | src/fnt/Makefile | 31 | ||||
-rwxr-xr-x | src/fnt/makefont.pe | 8 |
4 files changed, 47 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7c1e63e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/fnt/*.ttf @@ -14,10 +14,22 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +PREFIX ?= /usr +SHAREDIR ?= $(PREFIX)/share +DESTDIR ?= $(SHAREDIR) + all: fonts fonts: - make -C src/fnt + $(MAKE) -C $(CURDIR)/src/fnt clean: clean-fonts clean-fonts: - make -C src/fnt clean + $(MAKE) -C $(CURDIR)/src/fnt clean + +install: install-fonts +install-fonts: fonts + $(MAKE) -C $(CURDIR)/src/fnt install + +unistall: uninstall-fonts +uninstall-fonts: + $(MAKE) -C $(CURDIR)/src/fnt uninstall diff --git a/src/fnt/Makefile b/src/fnt/Makefile index 990da0b..e1bb5b7 100644 --- a/src/fnt/Makefile +++ b/src/fnt/Makefile @@ -14,10 +14,31 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +font-files = urwGothicDiamond-book \ + urwGothicDiamond-bookOblique \ + urwGothicDiamond-demi \ + urwGothicDiamond-demiOblique + +prefix-names = parabola_ +src-files = $(addprefix $(prefix-names),$(font-files)) +sfd-files = $(addsuffix _sfd3d0.sfd,$(src-files)) +ttf-src-files = $(addsuffix _sfd3d0.ttf,$(src-files)) +ttf-install-files = $(addsuffix .ttf,$(font-files)) + all: - ./makefont.pe parabola_urwGothicDiamond-bookOblique_sfd3d0.sfd - ./makefont.pe parabola_urwGothicDiamond-book_sfd3d0.sfd - ./makefont.pe parabola_urwGothicDiamond-demiOblique_sfd3d0.sfd - ./makefont.pe parabola_urwGothicDiamond-demi_sfd3d0.sfd + $(CURDIR)/makefont.pe $(sfd-files) + clean: - rm -v *.ttf + rm -v $(ttf-src-files) + +update-font-cache: + fc-cache -s > /dev/null + mkfontscale $(DESTDIR)/fonts/TTF + mkfontdir $(DESTDIR)/fonts/TTF + +install: + install -vdm 755 $(DESTDIR)/fonts/TTF + install -vm 644 $(ttf-src-files) $(DESTDIR)/fonts/TTF/$(ttf-install-files) + +unistall: + rm -v $(DESTDIR)/fonts/TTF/$(ttf-install-files) diff --git a/src/fnt/makefont.pe b/src/fnt/makefont.pe index 565bb92..b36b116 100755 --- a/src/fnt/makefont.pe +++ b/src/fnt/makefont.pe @@ -16,5 +16,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -Open($1) -Generate($1:r + ".ttf") +i=1 +while ( i<$argc ) + Open($argv[i]) + Generate($argv[i]:r + ".ttf") + i = i+1 +endloop |