aboutsummaryrefslogtreecommitdiff
path: root/japanese
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2021-03-03 15:42:09 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2021-03-03 15:42:09 +0000
commit04fee026adf39947c1af0f5214535c8829c4e2b4 (patch)
tree2806c19456258a00d92e935a4c56407634de3a61 /japanese
parent61d0d6d4480f1918a527bf0794c464b2835926bd (diff)
downloadports-04fee026adf39947c1af0f5214535c8829c4e2b4.tar.gz
ports-04fee026adf39947c1af0f5214535c8829c4e2b4.zip
copy font-hackgen for preparing of font-hackgen-nerd.
Notes
Notes: svn path=/head/; revision=567090
Diffstat (limited to 'japanese')
-rw-r--r--japanese/font-hackgen-nerd/Makefile64
-rw-r--r--japanese/font-hackgen-nerd/distinfo3
-rw-r--r--japanese/font-hackgen-nerd/files/20-unhint-hackgen.conf36
-rw-r--r--japanese/font-hackgen-nerd/files/62-fonts-hackgen.conf18
-rw-r--r--japanese/font-hackgen-nerd/files/pkg-install.in105
-rw-r--r--japanese/font-hackgen-nerd/pkg-descr3
-rw-r--r--japanese/font-hackgen-nerd/pkg-plist12
7 files changed, 241 insertions, 0 deletions
diff --git a/japanese/font-hackgen-nerd/Makefile b/japanese/font-hackgen-nerd/Makefile
new file mode 100644
index 000000000000..597686d68e11
--- /dev/null
+++ b/japanese/font-hackgen-nerd/Makefile
@@ -0,0 +1,64 @@
+# $FreeBSD$
+
+PORTNAME= hackgen
+PORTVERSION= 2.2.3
+#PORTREVISION= 0
+CATEGORIES= japanese x11-fonts
+MASTER_SITES= https://github.com/yuru7/HackGen/releases/download/v${PORTVERSION}/
+PKGNAMEPREFIX= ja-font-
+DISTNAME= HackGen_v${DISTVERSION}
+
+MAINTAINER= ume@FreeBSD.org
+COMMENT= HackGen is a composite font of Hack and GenJyuu-Gothic
+
+LICENSE= OFL11
+
+USES= fonts:fc zip
+FONTPATHSPEC= ${FONTNAME}:pri=60
+NO_ARCH= yes
+NO_BUILD= yes
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-install
+SUB_FILES= pkg-install
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+OPTIONS_MULTI= FONT_FAMILY
+OPTIONS_MULTI_FONT_FAMILY= HACKGEN HACKGEN_CONS HACKGEN35 HACKGEN35_CONS
+OPTIONS_DEFAULT= HACKGEN HACKGEN_CONS HACKGEN35 HACKGEN35_CONS
+OPTIONS_SUB= yes
+HACKGEN_DESC= HackGen
+HACKGEN_CONS_DESC= HackGen Console
+HACKGEN35_DESC= HackGen35
+HACKGEN35_CONS_DESC= HackGen35 Console
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MHACKGEN}
+HACKGEN_FONTS+= HackGen-Regular HackGen-Bold
+.endif
+.if ${PORT_OPTIONS:MHACKGEN_CONS}
+HACKGEN_FONTS+= HackGenConsole-Regular HackGenConsole-Bold
+.endif
+.if ${PORT_OPTIONS:MHACKGEN35}
+HACKGEN_FONTS+= HackGen35-Regular HackGen35-Bold
+.endif
+.if ${PORT_OPTIONS:MHACKGEN35_CONS}
+HACKGEN_FONTS+= HackGen35Console-Regular HackGen35Console-Bold
+.endif
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${FONTSDIR}
+.for FONT in ${HACKGEN_FONTS}
+ ${INSTALL_DATA} ${WRKSRC}/${FONT}.ttf ${STAGEDIR}${FONTSDIR}
+.endfor
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.d
+ ${INSTALL_DATA} ${FILESDIR}/20-unhint-${FONTNAME}.conf \
+ ${FILESDIR}/62-fonts-${FONTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail
+ ${LN} -s -f ../conf.avail/20-unhint-${FONTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${FONTNAME}.conf
+ ${LN} -s -f ../conf.avail/62-fonts-${FONTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${FONTNAME}.conf
+
+.include <bsd.port.mk>
diff --git a/japanese/font-hackgen-nerd/distinfo b/japanese/font-hackgen-nerd/distinfo
new file mode 100644
index 000000000000..87c55a6f10f7
--- /dev/null
+++ b/japanese/font-hackgen-nerd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1614781003
+SHA256 (HackGen_v2.2.3.zip) = 81dc942372856d7d7d0e3f8a1ecef11471e23161dce25165f0cddc01bcef62f1
+SIZE (HackGen_v2.2.3.zip) = 40427167
diff --git a/japanese/font-hackgen-nerd/files/20-unhint-hackgen.conf b/japanese/font-hackgen-nerd/files/20-unhint-hackgen.conf
new file mode 100644
index 000000000000..c85b2653479a
--- /dev/null
+++ b/japanese/font-hackgen-nerd/files/20-unhint-hackgen.conf
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <match target="font">
+ <or>
+ <test name="family">
+ <string>HackGen-Regular</string>
+ </test>
+ <test name="family">
+ <string>HackGen-Bold</string>
+ </test>
+ <test name="family">
+ <string>HackGenConsole-Regular</string>
+ </test>
+ <test name="family">
+ <string>HackGenConsole-Bold</string>
+ </test>
+ <test name="family">
+ <string>HackGen35-Regular</string>
+ </test>
+ <test name="family">
+ <string>HackGen35-Bold</string>
+ </test>
+ <test name="family">
+ <string>HackGen35Console-Regular</string>
+ </test>
+ <test name="family">
+ <string>HackGen35Console-Bold</string>
+ </test>
+ </or>
+ <edit name="autohint">
+ <bool>false</bool>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/japanese/font-hackgen-nerd/files/62-fonts-hackgen.conf b/japanese/font-hackgen-nerd/files/62-fonts-hackgen.conf
new file mode 100644
index 000000000000..cfd360fd20be
--- /dev/null
+++ b/japanese/font-hackgen-nerd/files/62-fonts-hackgen.conf
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>HackGen-Regular</family>
+ <family>HackGen-Bold</family>
+ <family>HackGenConsole-Regular</family>
+ <family>HackGenConsole-Bold</family>
+ <family>HackGen35-Regular</family>
+ <family>HackGen35-Bold</family>
+ <family>HackGen35Console-Regular</family>
+ <family>HackGen35Console-Bold</family>
+ </prefer>
+ </alias>
+</fontconfig>
diff --git a/japanese/font-hackgen-nerd/files/pkg-install.in b/japanese/font-hackgen-nerd/files/pkg-install.in
new file mode 100644
index 000000000000..ecc37fb4d192
--- /dev/null
+++ b/japanese/font-hackgen-nerd/files/pkg-install.in
@@ -0,0 +1,105 @@
+#!/bin/sh
+# $FreeBSD$
+
+catfontsdir()
+{
+ while read _IN
+ do
+ case "${_IN}" in
+ *-misc-hackgen*-*|[0-9]*|"") ;;
+ *) echo ${_IN} ;;
+ esac
+ done
+}
+
+ROMA=""
+BOLD="ds=y"
+RITA="ai=0.08"
+ROBL="ai=0.08"
+
+make_xlfd()
+{
+ _enc=$1
+ _file=$2
+ _vendor=$3
+ _fname=$4
+ _poc=$5
+ _weight=$6
+
+ case "${_poc}:${_enc}" in
+ p:jisx0201.1976-*) PFIX="bw=0.5" ;;
+ c:jisx0201.1976-*) PFIX="bw=0.5" ;;
+ p:*) PFIX="" ;;
+ c:*) PFIX="" ;;
+ esac
+
+ set -- "" ${_weight}-r \
+ ${RITA} ${_weight}-ri \
+ ${ROBL} ${_weight}-ro
+ while [ $# != 0 ]; do
+ _prefix="${PFIX}:$1"; shift
+ _variant=$1; shift
+ [ ${index_type} = "scale" -a ${_prefix} != ":" ] && continue
+ printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \
+ $_prefix $_file $_vendor "$_fname" $_variant $_poc $_enc
+ done | sed -e 's,::,:,g' -e 's,^:,,'
+}
+
+addentries()
+{
+ for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0 jisx0208.1997-0 jisx0213.2004-1
+ do
+ make_xlfd $ENC HackGen-Regular.ttf misc "hackgen" m medium
+ make_xlfd $ENC HackGen-Bold.ttf misc "hackgen" m bold
+ make_xlfd $ENC HackGenConsole-Regular.ttf misc "hackgenconsole" m medium
+ make_xlfd $ENC HackGenConsole-Bold.ttf misc "hackgenconsole" m bold
+ make_xlfd $ENC HackGen35-Regular.ttf misc "hackgen35" m medium
+ make_xlfd $ENC HackGen35-Bold.ttf misc "hackgen35" m bold
+ make_xlfd $ENC HackGen35Console-Regular.ttf misc "hackgen35console" m medium
+ make_xlfd $ENC HackgEn35Console-Bold.ttf misc "hackgen35console" m bold
+ done
+}
+
+nfonts()
+{
+ _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L}
+}
+
+install_fontsdir()
+{
+ index_type=${1:-"dir"}
+ index="fonts.${index_type}"
+ tmpfile="${index}.tmp"
+ touch ${index}
+ (catfontsdir < ${index}; addentries ${index_type}) > ${tmpfile}
+ nfonts < ${tmpfile} > ${index}
+ cat ${tmpfile} >> ${index}
+ rm -f ${tmpfile}
+}
+
+deinstall_fontsdir()
+{
+ index_type=${1:-"dir"}
+ index="fonts.${index_type}"
+ tmpfile="${index}.tmp"
+ catfontsdir < ${index} > ${tmpfile}
+ nfonts < ${tmpfile} > ${index}
+ cat ${tmpfile} >> ${index}
+ rm -f ${tmpfile}
+ if [ -r ${index} -a $(wc -l < ${index}) = 1 ]; then
+ rm -f ${index}
+ fi
+}
+
+case "$2" in
+POST-INSTALL)
+ cd %%FONTSDIR%%
+ install_fontsdir dir
+ install_fontsdir scale
+ ;;
+POST-DEINSTALL)
+ cd %%FONTSDIR%%
+ deinstall_fontsdir dir
+ deinstall_fontsdir scale
+ ;;
+esac
diff --git a/japanese/font-hackgen-nerd/pkg-descr b/japanese/font-hackgen-nerd/pkg-descr
new file mode 100644
index 000000000000..410ed6f27d2e
--- /dev/null
+++ b/japanese/font-hackgen-nerd/pkg-descr
@@ -0,0 +1,3 @@
+HackGen is a composite font of Hack and GenJyuu-Gothic.
+
+WWW: https://github.com/yuru7/HackGen
diff --git a/japanese/font-hackgen-nerd/pkg-plist b/japanese/font-hackgen-nerd/pkg-plist
new file mode 100644
index 000000000000..67968ef927dd
--- /dev/null
+++ b/japanese/font-hackgen-nerd/pkg-plist
@@ -0,0 +1,12 @@
+etc/fonts/conf.avail/20-unhint-hackgen.conf
+etc/fonts/conf.avail/62-fonts-hackgen.conf
+etc/fonts/conf.d/20-unhint-hackgen.conf
+etc/fonts/conf.d/62-fonts-hackgen.conf
+%%HACKGEN%%%%FONTSDIR%%/HackGen-Regular.ttf
+%%HACKGEN%%%%FONTSDIR%%/HackGen-Bold.ttf
+%%HACKGEN_CONS%%%%FONTSDIR%%/HackGenConsole-Regular.ttf
+%%HACKGEN_CONS%%%%FONTSDIR%%/HackGenConsole-Bold.ttf
+%%HACKGEN35%%%%FONTSDIR%%/HackGen35-Regular.ttf
+%%HACKGEN35%%%%FONTSDIR%%/HackGen35-Bold.ttf
+%%HACKGEN35_CONS%%%%FONTSDIR%%/HackGen35Console-Regular.ttf
+%%HACKGEN35_CONS%%%%FONTSDIR%%/HackGen35Console-Bold.ttf