]> git.xonotic.org Git - xonotic/mediasource.git/blobdiff - fonts/xolonium/Makefile
Merge branch 'sev/xolonium4_2' into 'master'
[xonotic/mediasource.git] / fonts / xolonium / Makefile
index 637500fd822cf6980e9ffa5206d37989c607c2ab..708594c50174a7abeda3de8e2903739c27caefab 100644 (file)
-.PHONY: public release install xonotic clean
-.PRECIOUS: tmp/fea/Xolonium-Regular.fea tmp/fea/Xolonium-Bold.fea
+# Release
 
+version     := 4.2
+weights     := Regular Bold
+mainFormats := otf ttf
+webFormats  := woff woff2
 
-version := 3.1
-release := xolonium-fonts-${version}
 
+# Files
 
-# Public Version
+mainFonts    := $(foreach w,$(weights), $(foreach f,$(mainFormats), fonts/$(f)/Xolonium-$(w).$(f)))
+webFonts     := $(foreach w,$(weights), $(foreach f,$(webFormats),  fonts/$(f)/Xolonium-$(w).$(f)))
+xonoticFonts := xonotic/Xolonium-GPL-Regular.otf xonotic/Xolonium-GPL-Bold.otf
 
-public: \
-       release/public/Xolonium-Bold.otf \
-       release/public/Xolonium-Regular.otf
 
-release: \
-       release/public/FEATURES.txt \
-       release/public/FONTLOG.txt \
-       release/public/LICENSE.txt \
-       release/public/xolonium.png \
-       release/public/Xolonium-Bold.otf \
-       release/public/Xolonium-Regular.otf
-               @ rm -rf ${release}
-               @ rm -rf ${release}.zip
-               @ mkdir ${release}
-               @ cp $^ ${release}
-               @ 7za a -tzip -mfb=258 -mpass=15 ${release}.zip ${release}
+# Main rules
 
-install: public
-       @ cp release/public/Xolonium-Regular.otf ~/.fonts/Xolonium-Regular.otf
-       @ cp release/public/Xolonium-Bold.otf    ~/.fonts/Xolonium-Bold.otf
+.PHONY: all
+all: ${mainFonts}
 
+.PHONY: web
+web: ${webFonts}
 
-# Xonotic Version
+.PHONY: xonotic
+xonotic: ${xonoticFonts}
 
-xonotic: \
-       release/xonotic/Xolonium-GPL-Bold.otf \
-       release/xonotic/Xolonium-GPL-Regular.otf
+.PHONY: clean
+clean:
+       @ rm -fr tmp fonts
+       @ rm -f ${xonoticFonts}
 
 
-# Cleanup
+# Font files
 
-clean:
-       @ rm -rf tmp
-       @ rm -rf ${release}
-       @ rm -rf ${release}.zip
-       @ rm -rf release/public/Xolonium-Bold.otf
-       @ rm -rf release/public/Xolonium-Regular.otf
-       @ rm -rf release/xonotic/Xolonium-GPL-Bold.otf
-       @ rm -rf release/xonotic/Xolonium-GPL-Regular.otf
+fonts/otf/Xolonium-%.otf: \
+       tmp/otf/Xolonium-%.otf \
+       tmp/fea/Xolonium-%.fea
+               @ mkdir -p $(@D)
+               @ ./tools/clean-font.py $^ $@
+
+fonts/ttf/Xolonium-%.ttf: \
+       tmp/ttf/Xolonium-%.ttf \
+       tmp/fea/Xolonium-%.fea
+               @ mkdir -p $(@D)
+               @ ./tools/clean-font.py $^ $@
+
+fonts/woff/Xolonium-%.woff: \
+       fonts/ttf/Xolonium-%.ttf
+               @ mkdir -p $(@D)
+               @ ./tools/make-woff.py $^ $@
 
+fonts/woff2/Xolonium-%.woff2: \
+       fonts/ttf/Xolonium-%.ttf
+               @ mkdir -p $(@D)
+               @ ./tools/make-woff.py $^ $@
 
-# Recipes
 
-release/public/Xolonium-%.otf: \
+# Temporary files
+
+tmp/otf/Xolonium-%.otf: \
        src/sfd/Xolonium-%.sfd \
-       src/sfd/Xolonium-Dingbats.sfd \
+       src/sfd/Xolonium-Common.sfd \
        tmp/fea/Xolonium-%.fea
-               @ ./tools/compile.ff ${version} $^ $@
+               @ mkdir -p $(@D)
+               @ ./tools/make-font.py $^ NONE ${version} $@
+
+tmp/ttf/Xolonium-%.ttf: \
+       src/sfd/Xolonium-%.sfd \
+       src/sfd/Xolonium-Common.sfd \
+       tmp/fea/Xolonium-%.fea \
+       tmp/hti/Xolonium-%.hti
+               @ mkdir -p $(@D)
+               @ ./tools/make-font.py $^ ${version} $@
 
+.PRECIOUS: tmp/fea/Xolonium-%.fea
 tmp/fea/Xolonium-%.fea: \
-       src/fea/Xolonium-Shared-Head.fea \
-       src/fea/Xolonium-Kern-Latin.fea \
-       src/fea/Xolonium-Kern-Greek.fea \
-       src/fea/Xolonium-Kern-Cyrillic.fea \
-       src/fea/Xolonium-Unshared-%.fea \
-       src/fea/Xolonium-Shared-Tail.fea
-               @ mkdir -p tmp/fea
-               @ cat $^ | sed -f tools/substitute.sed > $@
-
-release/xonotic/Xolonium-GPL-%.otf: \
+       src/fea/Xolonium-Common.fea \
+       src/fea/Xolonium-Common-Class-Latin.fea \
+       src/fea/Xolonium-Common-Class-Greek.fea \
+       src/fea/Xolonium-Common-Class-Cyrillic.fea \
+       src/fea/Xolonium-Common-Kern-All.fea \
+       src/fea/Xolonium-Common-Kern-Latin.fea \
+       src/fea/Xolonium-Common-Kern-Greek.fea \
+       src/fea/Xolonium-Common-Kern-Cyrillic.fea \
+       src/fea/Xolonium-Common-Kern.fea
+               @ mkdir -p $(@D)
+               @ sed -f tools/replace-names.sed $^ > $@
+
+.PRECIOUS: tmp/hti/Xolonium-%.hti
+tmp/hti/Xolonium-%.hti: \
+       src/hti/Xolonium-Common-meta.hti \
+       src/hti/Xolonium-%-cvt.hti \
+       src/hti/Xolonium-Common-fpgm.hti \
+       src/hti/Xolonium-%-prep.hti \
+       src/hti/Xolonium-Common-glyphs.hti \
+       src/hti/Xolonium-Common-composites.hti
+               @ mkdir -p $(@D)
+               @ cat $^ > $@
+
+
+# Xonotic files
+
+xonotic/Xolonium-GPL-%.otf: \
+       tmp/otf/Xolonium-GPL-%.otf \
+       tmp/fea/Xolonium-%.fea
+               @ ./tools/clean-font.py $^ $@
+
+tmp/otf/Xolonium-GPL-%.otf: \
        tmp/sfd/Xolonium-GPL-%.sfd \
-       src/sfd/Xolonium-Dingbats.sfd \
+       src/sfd/Xolonium-Common.sfd \
        tmp/fea/Xolonium-%.fea
-               @ ./tools/compile.ff ${version} $^ $@
+               @ ./tools/make-font.py $^ NONE ${version} $@
 
 tmp/sfd/Xolonium-GPL-%.sfd: \
        src/sfd/Xolonium-%.sfd
-               @ mkdir -p tmp/sfd
+               @ mkdir -p $(@D)
                @ cp $^ $@
                @ sed -i 's|FontName: Xolonium|FontName: Xolonium-GPL|' $@
                @ sed -i 's|FullName: Xolonium|FullName: Xolonium GPL|' $@
                @ sed -i 's|FamilyName: Xolonium|FamilyName: Xolonium GPL|' $@
-               @ sed -i 's|LangName:.*|LangName: 1033 "" "" "$*" "" "" "" "" "" "" "Severin Meyer" "" "http://gitlab.com/sev/xolonium" "" "This font is licensed under the GNU General Public License, either version 2 of the license, or any later version.+AAoACgAA-This font is provided WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GNU General Public License for more details.+AAoACgAA-As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version." "http://www.gnu.org/licenses/gpl-2.0"|' $@
+               @ sed -i 's|LangName:.*|LangName: 1033 "" "" "$*" "" "" "" "" "" "" "Severin Meyer" "" "https://gitlab.com/sev/xolonium" "" "This font is licensed under the GNU General Public License, either version 2 of the license, or any later version. This font is provided WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GNU General Public License for more details.+AAoACgAA-As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version." "https://www.gnu.org/licenses/gpl-2.0"|' $@