summaryrefslogtreecommitdiffstats
path: root/share/mk/build/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/build/fonts')
-rw-r--r--share/mk/build/fonts/_.mk19
-rw-r--r--share/mk/build/fonts/devpdf/download1
-rw-r--r--share/mk/build/fonts/download.mk26
-rw-r--r--share/mk/build/fonts/tinos/_.mk20
-rw-r--r--share/mk/build/fonts/tinos/afm.mk22
-rw-r--r--share/mk/build/fonts/tinos/dit.mk22
-rw-r--r--share/mk/build/fonts/tinos/pfa.mk22
7 files changed, 132 insertions, 0 deletions
diff --git a/share/mk/build/fonts/_.mk b/share/mk/build/fonts/_.mk
new file mode 100644
index 0000000..cd5d29e
--- /dev/null
+++ b/share/mk/build/fonts/_.mk
@@ -0,0 +1,19 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_INCLUDED
+MAKEFILE_BUILD_FONTS_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/directory_variables/build.mk
+
+
+_FONTSDIR := $(builddir)/fonts
+
+
+.PHONY: build-fonts
+build-fonts: build-fonts-download build-fonts-tinos
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/devpdf/download b/share/mk/build/fonts/devpdf/download
new file mode 100644
index 0000000..e230c82
--- /dev/null
+++ b/share/mk/build/fonts/devpdf/download
@@ -0,0 +1 @@
+ Tinos Tinos.pfa
diff --git a/share/mk/build/fonts/download.mk b/share/mk/build/fonts/download.mk
new file mode 100644
index 0000000..3320c97
--- /dev/null
+++ b/share/mk/build/fonts/download.mk
@@ -0,0 +1,26 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_DOWNLOAD_INCLUDED
+MAKEFILE_BUILD_FONTS_DOWNLOAD_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+
+
+DOWNLOAD := $(MAKEFILEDIR)/build/fonts/devpdf/download
+
+_DOWNLOAD := $(_FONTSDIR)/devpdf/download
+
+
+$(_DOWNLOAD): $(_FONTSDIR)/%: $(MAKEFILEDIR)/build/fonts/% $(MK) | $$(@D)/
+ $(info $(INFO_)CP $@)
+ $(CP) -T $< $@
+
+
+.PHONY: build-fonts-download
+build-fonts-download: $(_DOWNLOAD)
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/_.mk b/share/mk/build/fonts/tinos/_.mk
new file mode 100644
index 0000000..01bc122
--- /dev/null
+++ b/share/mk/build/fonts/tinos/_.mk
@@ -0,0 +1,20 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/tinos/pfa.mk
+include $(MAKEFILEDIR)/build/fonts/tinos/dit.mk
+
+
+_TINOS := $(_TINOS_PFA) $(_TINOSR)
+
+
+.PHONY: build-fonts-tinos
+build-fonts-tinos: $(_TINOS)
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/afm.mk b/share/mk/build/fonts/tinos/afm.mk
new file mode 100644
index 0000000..0745fea
--- /dev/null
+++ b/share/mk/build/fonts/tinos/afm.mk
@@ -0,0 +1,22 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_AFM_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_AFM_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/texlive-fonts-extra-links/Tinos-Regular.ttf.mk
+include $(MAKEFILEDIR)/configure/build-depends/fontforge/fontforge.mk
+
+
+_TINOSR_AFM := $(_FONTSDIR)/devpdf/TinosR.afm
+
+
+$(_TINOSR_AFM): $(TINOSR_TTF) $(MK) | $$(@D)/
+ $(info $(INFO_)FONTFORGE $@)
+ $(FONTFORGE) $(FONTFORGEFLAGS) -lang=ff -c 'Open("$<");Generate("$@");'
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/dit.mk b/share/mk/build/fonts/tinos/dit.mk
new file mode 100644
index 0000000..b00a05d
--- /dev/null
+++ b/share/mk/build/fonts/tinos/dit.mk
@@ -0,0 +1,22 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_DIT_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_DIT_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/build/fonts/tinos/afm.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/afmtodit.mk
+
+
+_TINOSR := $(_FONTSDIR)/devpdf/TinosR
+
+
+$(_TINOSR): $(_FONTSDIR)/%: $(PDF_TEXT_ENC) $(_TINOSR_AFM) $(PDF_TEXT_MAP) $(MK) | $$(@D)/
+ $(info $(INFO_)AFMTODIT $@)
+ $(AFMTODIT) -e $(PDF_TEXT_ENC) $(_TINOSR_AFM) $(PDF_TEXT_MAP) $@
+
+
+endif # include guard
diff --git a/share/mk/build/fonts/tinos/pfa.mk b/share/mk/build/fonts/tinos/pfa.mk
new file mode 100644
index 0000000..f65b087
--- /dev/null
+++ b/share/mk/build/fonts/tinos/pfa.mk
@@ -0,0 +1,22 @@
+# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_BUILD_FONTS_TINOS_PFA_INCLUDED
+MAKEFILE_BUILD_FONTS_TINOS_PFA_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/fonts/_.mk
+include $(MAKEFILEDIR)/configure/build-depends/texlive-fonts-extra/Tinos.pfb.mk
+include $(MAKEFILEDIR)/configure/build-depends/groff/pfbtops.mk
+
+
+_TINOS_PFA := $(_FONTSDIR)/devpdf/Tinos.pfa
+
+
+$(_TINOS_PFA): $(TINOS_PFB) $(MK) | $$(@D)/
+ $(info $(INFO_)PFBTOPS $@)
+ $(PFBTOPS) <$< >$@
+
+
+endif # include guard