diff options
author | hrs <hrs@FreeBSD.org> | 2010-03-02 12:58:08 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2010-03-02 12:58:08 +0800 |
commit | b39d65cabda9ecb88e67bd6fdb4b3ed21a5fa3d1 (patch) | |
tree | 756ed9f1ca731733c9bec1a09431c8b6389936a1 /japanese | |
parent | dbd9f92b82f73bd45e13200535dda8e805acaa52 (diff) | |
download | freebsd-ports-gnome-b39d65cabda9ecb88e67bd6fdb4b3ed21a5fa3d1.tar.gz freebsd-ports-gnome-b39d65cabda9ecb88e67bd6fdb4b3ed21a5fa3d1.tar.zst freebsd-ports-gnome-b39d65cabda9ecb88e67bd6fdb4b3ed21a5fa3d1.zip |
Add japanese/font-ipaex, new font series based on IPA fonts which contain
fixed-width Japanese and proportional Latin alphabets for
Japanese traditional printing convention.
Feature safe: yes
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/font-ipaex/Makefile | 62 | ||||
-rw-r--r-- | japanese/font-ipaex/distinfo | 3 | ||||
-rw-r--r-- | japanese/font-ipaex/files/20-unhint-ipaex.conf | 14 | ||||
-rw-r--r-- | japanese/font-ipaex/files/62-fonts-ipaex.conf | 17 | ||||
-rw-r--r-- | japanese/font-ipaex/files/pkg-install.in | 97 | ||||
-rw-r--r-- | japanese/font-ipaex/pkg-descr | 11 | ||||
-rw-r--r-- | japanese/font-ipaex/pkg-plist | 21 |
8 files changed, 226 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index 67c32bc247c7..e4712a5ee7e5 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -76,6 +76,7 @@ SUBDIR += foldoc-fpw SUBDIR += font-ipa SUBDIR += font-ipa-uigothic + SUBDIR += font-ipaex SUBDIR += font-kochi SUBDIR += font-mona-ipa SUBDIR += font-mplus diff --git a/japanese/font-ipaex/Makefile b/japanese/font-ipaex/Makefile new file mode 100644 index 000000000000..3d90390c13cc --- /dev/null +++ b/japanese/font-ipaex/Makefile @@ -0,0 +1,62 @@ +# New ports collection makefile for: font-ipaex +# Date created: 2 March 2010 +# Whom: hrs +# $FreeBSD$ +# + +PORTNAME= font-ipaex +PORTVERSION= 00101 +CATEGORIES= japanese x11-fonts +MASTER_SITES= http://info.openlab.ipa.go.jp/ipafont/fontdata/ +DISTNAME= IPAexfont${PORTVERSION} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= IPAex Japanese fonts + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig + +USE_ZIP= yes +NO_BUILD= yes +PKGINSTALL= ${WRKDIR}/pkg-install +PKGDEINSTALL= ${WRKDIR}/pkg-install +SUB_FILES= pkg-install +SUB_LIST= X_FONTSDIR=${PREFIX}/${X_FONTSDIR} +PLIST_SUB= X_FONTSDIR=${X_FONTSDIR} \ + LOCAL_FONTSDIR=${LOCAL_FONTSDIR} +PORTDOCS= IPA_Font_License_Agreement_v1.0.txt \ + Readme_IPAexfont${PORTVERSION}.txt + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +post-extract: + cd ${WRKSRC} && for F in *.ttf; do ${MV} $${F} $${F%.ttf}.otf; done + +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/*.otf ${DATADIR} + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/OTF + ${LN} -s -f \ + ${DATADIR}/ipaex*.otf \ + ${LOCALBASE}/${LOCAL_FONTSDIR}/OTF/ + ${MKDIR} ${LOCALBASE}/${X_FONTSDIR}/OTF + ${LN} -s -f \ + ${DATADIR}/ipaex*.otf \ + ${LOCALBASE}/${X_FONTSDIR}/OTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-ipaex.conf \ + ${FILESDIR}/62-fonts-ipaex.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-ipaex.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-ipaex.conf + ${LN} -s -f ../conf.avail/62-fonts-ipaex.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-ipaex.conf +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +post-install: + ${LOCALBASE}/bin/fc-cache -f -v ${LOCALBASE}/${X_FONTSDIR}/OTF + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/japanese/font-ipaex/distinfo b/japanese/font-ipaex/distinfo new file mode 100644 index 000000000000..3b585a554b59 --- /dev/null +++ b/japanese/font-ipaex/distinfo @@ -0,0 +1,3 @@ +MD5 (IPAexfont00101.zip) = 5a1ec489515c9ee99151fad15cfb796f +SHA256 (IPAexfont00101.zip) = 62847ae2d1a4510f8e2e8e2110e51822b087e5b2db2069440a5e2f57ef4dc2f9 +SIZE (IPAexfont00101.zip) = 9655506 diff --git a/japanese/font-ipaex/files/20-unhint-ipaex.conf b/japanese/font-ipaex/files/20-unhint-ipaex.conf new file mode 100644 index 000000000000..843c0d3ce001 --- /dev/null +++ b/japanese/font-ipaex/files/20-unhint-ipaex.conf @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <test name="family"> + <string>IPAexMincho</string> + <string>IPAexGothic</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-ipaex/files/62-fonts-ipaex.conf b/japanese/font-ipaex/files/62-fonts-ipaex.conf new file mode 100644 index 000000000000..018368f5e9dd --- /dev/null +++ b/japanese/font-ipaex/files/62-fonts-ipaex.conf @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>serif</family> + <prefer> + <family>IPAexMincho</family> + </prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer> + <family>IPAexGothic</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-ipaex/files/pkg-install.in b/japanese/font-ipaex/files/pkg-install.in new file mode 100644 index 000000000000..7a411417ff31 --- /dev/null +++ b/japanese/font-ipaex/files/pkg-install.in @@ -0,0 +1,97 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/OTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-ipa-IPAex*|*-ipa-ex*|[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 + + case "${_poc}:${_enc}" in + p:jisx0201.1976-*) PFIX="bw=0.5" ;; + c:jisx0201.1976-*) PFIX="bw=0.5" ;; + p:*) PFIX="" ;; + c:*) PFIX="" ;; + esac + + set -- "${ROMA}" medium-r \ + ${BOLD} bold-r \ + ${ITAL} medium-i \ + ${ITAL}:${BOLD} bold-i \ + ${OBLI} medium-o \ + ${OBLI}:${BOLD} bold-o \ + ${RITA} medium-ri \ + ${RITA}:${BOLD} bold-ri \ + ${ROBL} medium-ro \ + ${ROBL}:${BOLD} bold-ro + while [ $# != 0 ]; do + _prefix="${PFIX}:$1"; shift + _variant=$1; shift + 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 ipaexg.otf ipa IPAexGothic c + make_xlfd $ENC ipaexg.otf ipa IPAexGothic p + make_xlfd $ENC ipaexg.otf ipa exgothic c + make_xlfd $ENC ipaexg.otf ipa exgothic p + make_xlfd $ENC ipaexm.otf ipa IPAexMincho c + make_xlfd $ENC ipaexm.otf ipa IPAexMincho p + make_xlfd $ENC ipaexm.otf ipa exmincho c + make_xlfd $ENC ipaexm.otf ipa exmincho p + done +} + +nfonts () +{ + _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L} +} + +case "$2" in +POST-INSTALL) + cd ${X_FONTSDIR} + touch fonts.dir + (catfontsdir < fonts.dir; addentries) > fonts.dir.tmp + nfonts < fonts.dir.tmp > fonts.dir + cat fonts.dir.tmp >> fonts.dir + rm -f fonts.dir.tmp + ;; +POST-DEINSTALL) + cd ${X_FONTSDIR} + catfontsdir < fonts.dir > fonts.dir.tmp + nfonts < fonts.dir.tmp > fonts.dir + cat fonts.dir.tmp >> fonts.dir + rm -f fonts.dir.tmp + if [ -r fonts.dir -a `wc -l < fonts.dir` = 1 ]; then + rm -f fonts.dir + fi + rmdir ${X_FONTSDIR} > /dev/null 2>&1 || true + ;; +esac diff --git a/japanese/font-ipaex/pkg-descr b/japanese/font-ipaex/pkg-descr new file mode 100644 index 000000000000..0298ce8ca80a --- /dev/null +++ b/japanese/font-ipaex/pkg-descr @@ -0,0 +1,11 @@ +Japanese TrueType fonts distributed by Infomation-technology Promotion +Agency (IPA) Japan. + +IPAex Mincho, the integration of IPA Mincho and IPA P Mincho, and +IPAex Gothic, the integration of IPA Gothic and IPA P Gothic are newly +developed. This new font series is strictly following Japanese +printing font tradition, namely, Japanese characters (Kanji, Kana and +punctuation marks) are full width mono-space pitch, and Western +characters are proportional pitch. + +WWW: http://ossipedia.ipa.go.jp/ipafont/index.html diff --git a/japanese/font-ipaex/pkg-plist b/japanese/font-ipaex/pkg-plist new file mode 100644 index 000000000000..7474fa3a1a0a --- /dev/null +++ b/japanese/font-ipaex/pkg-plist @@ -0,0 +1,21 @@ +@comment $FreeBSD$ +%%DATADIR%%/ipaexg.otf +%%DATADIR%%/ipaexm.otf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/OTF/ipaexg.otf +%%LOCAL_FONTSDIR%%/OTF/ipaexm.otf +@dirrmtry %%LOCAL_FONTSDIR%%/OTF +@dirrmtry %%LOCAL_FONTSDIR%% +etc/fonts/conf.avail/20-unhint-ipaex.conf +etc/fonts/conf.avail/62-fonts-ipaex.conf +@exec ln -s -f ../conf.avail/20-unhint-ipaex.conf %D/etc/fonts/conf.d/20-unhint-ipaex.conf +@exec ln -s -f ../conf.avail/62-fonts-ipaex.conf %D/etc/fonts/conf.d/62-fonts-ipaex.conf +@unexec rm -f %D/etc/fonts/conf.d/20-unhint-ipaex.conf +@unexec rm -f %D/etc/fonts/conf.d/62-fonts-ipaex.conf +%%X_FONTSDIR%%/OTF/ipaexg.otf +%%X_FONTSDIR%%/OTF/ipaexm.otf +@exec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/OTF || true +@unexec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/OTF || true +@unexec rm -f %D/%%X_FONTSDIR%%/OTF/fonts.cache-1 +@dirrmtry %%X_FONTSDIR%%/OTF +@unexec if [ -d %D/%%X_FONTSDIR%%/OTF ]; then %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/OTF || true; fi |