aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2016-07-21 21:58:57 +0800
committerume <ume@FreeBSD.org>2016-07-21 21:58:57 +0800
commite060b1d531ff568762e583d839af8ddecfe5379a (patch)
tree197c14dcbda9a18ab356690b90b51ba6aa344d1f /japanese
parent70afa331bc1eb0bf4b02c931d69fa99d4fb466e8 (diff)
downloadfreebsd-ports-gnome-e060b1d531ff568762e583d839af8ddecfe5379a.tar.gz
freebsd-ports-gnome-e060b1d531ff568762e583d839af8ddecfe5379a.tar.zst
freebsd-ports-gnome-e060b1d531ff568762e583d839af8ddecfe5379a.zip
Add new port -- GenShinGothic Japanese TrueType fonts.
Diffstat (limited to 'japanese')
-rw-r--r--japanese/Makefile1
-rw-r--r--japanese/font-genshingothic/Makefile46
-rw-r--r--japanese/font-genshingothic/distinfo3
-rw-r--r--japanese/font-genshingothic/files/20-unhint-genshingothic.conf75
-rw-r--r--japanese/font-genshingothic/files/62-fonts-genshingothic.conf36
-rw-r--r--japanese/font-genshingothic/files/pkg-install.in124
-rw-r--r--japanese/font-genshingothic/pkg-descr3
-rw-r--r--japanese/font-genshingothic/pkg-plist23
8 files changed, 311 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile
index af187fa0e000..441a589d10ff 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -65,6 +65,7 @@
SUBDIR += font-ayu20
SUBDIR += font-elisa10
SUBDIR += font-elisa8
+ SUBDIR += font-genshingothic
SUBDIR += font-ipa
SUBDIR += font-ipa-uigothic
SUBDIR += font-ipaex
diff --git a/japanese/font-genshingothic/Makefile b/japanese/font-genshingothic/Makefile
new file mode 100644
index 000000000000..0fd08684f144
--- /dev/null
+++ b/japanese/font-genshingothic/Makefile
@@ -0,0 +1,46 @@
+# $FreeBSD$
+
+PORTNAME= genshingothic
+PORTVERSION= 20150607
+#PORTREVISION= 0
+CATEGORIES= japanese x11-fonts
+MASTER_SITES= SOURCEFORGE_JP
+MASTER_SITE_SUBDIR=users/8/8634
+PKGNAMEPREFIX= ja-font-
+
+MAINTAINER= ume@FreeBSD.org
+COMMENT= GenShinGothic Japanese TrueType fonts
+
+LICENSE= OFL11
+
+USES= 7z fonts:fc
+FONTNAME= genshingothic
+NO_ARCH= yes
+NO_BUILD= yes
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-install
+SUB_FILES= pkg-install
+NO_WRKSUBDIR= yes
+PORTDOCS= *
+
+OPTIONS_DEFINE= DOCS
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${FONTSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} *.ttf ${STAGEDIR}${FONTSDIR}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.d
+ ${INSTALL_DATA} ${FILESDIR}/20-unhint-${PORTNAME}.conf \
+ ${FILESDIR}/62-fonts-${PORTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail
+ ${LN} -s -f ../conf.avail/20-unhint-${PORTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${PORTNAME}.conf
+ ${LN} -s -f ../conf.avail/62-fonts-${PORTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${PORTNAME}.conf
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
+ "! -name *\.ttf"
+
+.include <bsd.port.mk>
diff --git a/japanese/font-genshingothic/distinfo b/japanese/font-genshingothic/distinfo
new file mode 100644
index 000000000000..ef2e035f5e34
--- /dev/null
+++ b/japanese/font-genshingothic/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1469085683
+SHA256 (genshingothic-20150607.7z) = df357a6c0fc469698a8b13a43b4a9b924f074c6cc83c98c63db0afbcb6fac603
+SIZE (genshingothic-20150607.7z) = 16803266
diff --git a/japanese/font-genshingothic/files/20-unhint-genshingothic.conf b/japanese/font-genshingothic/files/20-unhint-genshingothic.conf
new file mode 100644
index 000000000000..85839b97e462
--- /dev/null
+++ b/japanese/font-genshingothic/files/20-unhint-genshingothic.conf
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <match target="font">
+ <or>
+ <test name="family">
+ <string>Gen Shin Gothic Bold</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic ExtraLight</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Heavy</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Light</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Medium</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Normal</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Regular</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace Bold</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace ExtraLight</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace Heavy</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace Light</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace Medium</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace Normal</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic Monospace Regular</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P Bold</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P ExtraLight</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P Heavy</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P Light</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P Medium</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P Normal</string>
+ </test>
+ <test name="family">
+ <string>Gen Shin Gothic P Regular</string>
+ </test>
+ </or>
+ <edit name="autohint">
+ <bool>false</bool>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/japanese/font-genshingothic/files/62-fonts-genshingothic.conf b/japanese/font-genshingothic/files/62-fonts-genshingothic.conf
new file mode 100644
index 000000000000..84edab824627
--- /dev/null
+++ b/japanese/font-genshingothic/files/62-fonts-genshingothic.conf
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+ <family>Gen Shin Gothic Regular</family>
+ <family>Gen Shin Gothic Normal</family>
+ <family>Gen Shin Gothic Medium</family>
+ <family>Gen Shin Gothic Light</family>
+ <family>Gen Shin Gothic Bold</family>
+ <family>Gen Shin Gothic ExtraLight</family>
+ <family>Gen Shin Gothic Heavy</family>
+ <family>Gen Shin Gothic P Regular</family>
+ <family>Gen Shin Gothic P Normal</family>
+ <family>Gen Shin Gothic P Medium</family>
+ <family>Gen Shin Gothic P Light</family>
+ <family>Gen Shin Gothic P Bold</family>
+ <family>Gen Shin Gothic P ExtraLight</family>
+ <family>Gen Shin Gothic P Heavy</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>Gen Shin Gothic Monospace Regular</family>
+ <family>Gen Shin Gothic Monospace Normal</family>
+ <family>Gen Shin Gothic Monospace Medium</family>
+ <family>Gen Shin Gothic Monospace Light</family>
+ <family>Gen Shin Gothic Monospace Bold</family>
+ <family>Gen Shin Gothic Monospace ExtraLight</family>
+ <family>Gen Shin Gothic Monospace Heavy</family>
+ </prefer>
+ </alias>
+</fontconfig>
diff --git a/japanese/font-genshingothic/files/pkg-install.in b/japanese/font-genshingothic/files/pkg-install.in
new file mode 100644
index 000000000000..2a0359cb5a93
--- /dev/null
+++ b/japanese/font-genshingothic/files/pkg-install.in
@@ -0,0 +1,124 @@
+#!/bin/sh
+# $FreeBSD$
+
+catfontsdir()
+{
+ while read _IN
+ do
+ case "${_IN}" in
+ *"-adobe-gen shin gothic"*|[0-9]*|"") ;;
+ *) echo ${_IN} ;;
+ esac
+ done
+}
+
+ROMA=""
+BOLD="ds=y"
+ITAL="ai=0.15"
+OBLI="ai=0.15"
+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 \
+ ${ITAL} ${_weight}-i \
+ ${OBLI} ${_weight}-o \
+ ${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 GenShinGothic-ExtraLight.ttf adobe "gen shin gothic" p thin
+ make_xlfd $ENC GenShinGothic-Light.ttf adobe "gen shin gothic" p extralight
+ make_xlfd $ENC GenShinGothic-Normal.ttf adobe "gen shin gothic" p light
+ make_xlfd $ENC GenShinGothic-Regular.ttf adobe "gen shin gothic" p book
+ make_xlfd $ENC GenShinGothic-Medium.ttf adobe "gen shin gothic" p medium
+ make_xlfd $ENC GenShinGothic-Bold.ttf adobe "gen shin gothic" p bold
+ make_xlfd $ENC GenShinGothic-Heavy.ttf adobe "gen shin gothic" p black
+
+ make_xlfd $ENC GenShinGothic-P-ExtraLight.ttf adobe "gen shin gothic p" p thin
+ make_xlfd $ENC GenShinGothic-P-Light.ttf adobe "gen shin gothic p" p extralight
+ make_xlfd $ENC GenShinGothic-P-Normal.ttf adobe "gen shin gothic p" p light
+ make_xlfd $ENC GenShinGothic-P-Regular.ttf adobe "gen shin gothic p" p book
+ make_xlfd $ENC GenShinGothic-P-Medium.ttf adobe "gen shin gothic p" p medium
+ make_xlfd $ENC GenShinGothic-P-Bold.ttf adobe "gen shin gothic p" p bold
+ make_xlfd $ENC GenShinGothic-P-Heavy.ttf adobe "gen shin gothic p" p black
+
+ make_xlfd $ENC GenShinGothic-Monospace-ExtraLight.ttf adobe "gen shin gothic monospace" c thin
+ make_xlfd $ENC GenShinGothic-Monospace-Light.ttf adobe "gen shin gothic monospace" c extralight
+ make_xlfd $ENC GenShinGothic-Monospace-Normal.ttf adobe "gen shin gothic monospace" c light
+ make_xlfd $ENC GenShinGothic-Monospace-Regular.ttf adobe "gen shin gothic monospace" c book
+ make_xlfd $ENC GenShinGothic-Monospace-Medium.ttf adobe "gen shin gothic monospace" c medium
+ make_xlfd $ENC GenShinGothic-Monospace-Bold.ttf adobe "gen shin gothic monospace" c bold
+ make_xlfd $ENC GenShinGothic-Monospace-Heavy.ttf adobe "gen shin gothic monospace" c black
+ 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-genshingothic/pkg-descr b/japanese/font-genshingothic/pkg-descr
new file mode 100644
index 000000000000..938f16f7733c
--- /dev/null
+++ b/japanese/font-genshingothic/pkg-descr
@@ -0,0 +1,3 @@
+GenShinGothic Japanese TrueType fonts
+
+WWW: http://jikasei.me/font/genshin/
diff --git a/japanese/font-genshingothic/pkg-plist b/japanese/font-genshingothic/pkg-plist
new file mode 100644
index 000000000000..dc8bcaddbcc2
--- /dev/null
+++ b/japanese/font-genshingothic/pkg-plist
@@ -0,0 +1,23 @@
+etc/fonts/conf.avail/20-unhint-genshingothic.conf
+etc/fonts/conf.avail/62-fonts-genshingothic.conf
+%%FONTSDIR%%/GenShinGothic-Bold.ttf
+%%FONTSDIR%%/GenShinGothic-ExtraLight.ttf
+%%FONTSDIR%%/GenShinGothic-Heavy.ttf
+%%FONTSDIR%%/GenShinGothic-Light.ttf
+%%FONTSDIR%%/GenShinGothic-Medium.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-Bold.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-ExtraLight.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-Heavy.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-Light.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-Medium.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-Normal.ttf
+%%FONTSDIR%%/GenShinGothic-Monospace-Regular.ttf
+%%FONTSDIR%%/GenShinGothic-Normal.ttf
+%%FONTSDIR%%/GenShinGothic-P-Bold.ttf
+%%FONTSDIR%%/GenShinGothic-P-ExtraLight.ttf
+%%FONTSDIR%%/GenShinGothic-P-Heavy.ttf
+%%FONTSDIR%%/GenShinGothic-P-Light.ttf
+%%FONTSDIR%%/GenShinGothic-P-Medium.ttf
+%%FONTSDIR%%/GenShinGothic-P-Normal.ttf
+%%FONTSDIR%%/GenShinGothic-P-Regular.ttf
+%%FONTSDIR%%/GenShinGothic-Regular.ttf