aboutsummaryrefslogtreecommitdiff
path: root/japanese/vlgothic/files
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2008-05-25 07:10:33 +0000
committerHiroki Sato <hrs@FreeBSD.org>2008-05-25 07:10:33 +0000
commita64fc33a1916315f2dd54c87f5450020c7f30600 (patch)
tree0806769ff74f45ec7d103290a5bbfad82108ec33 /japanese/vlgothic/files
parentb9966eafd775fe8fae7d4821b7054843f62f0d97 (diff)
downloadports-a64fc33a1916315f2dd54c87f5450020c7f30600.tar.gz
ports-a64fc33a1916315f2dd54c87f5450020c7f30600.zip
Notes
Diffstat (limited to 'japanese/vlgothic/files')
-rw-r--r--japanese/vlgothic/files/20-unhint-vlgothic.conf14
-rw-r--r--japanese/vlgothic/files/62-fonts-vlgothic.conf17
-rw-r--r--japanese/vlgothic/files/63-vlgothic.conf17
-rw-r--r--japanese/vlgothic/files/pkg-install.in87
4 files changed, 118 insertions, 17 deletions
diff --git a/japanese/vlgothic/files/20-unhint-vlgothic.conf b/japanese/vlgothic/files/20-unhint-vlgothic.conf
new file mode 100644
index 000000000000..30b3395591c7
--- /dev/null
+++ b/japanese/vlgothic/files/20-unhint-vlgothic.conf
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <match target="font">
+ <test name="family">
+ <string>VL Gothic</string>
+ <string>VL PGothic</string>
+ </test>
+ <edit name="autohint">
+ <bool>false</bool>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/japanese/vlgothic/files/62-fonts-vlgothic.conf b/japanese/vlgothic/files/62-fonts-vlgothic.conf
new file mode 100644
index 000000000000..8ca1fbfeb94d
--- /dev/null
+++ b/japanese/vlgothic/files/62-fonts-vlgothic.conf
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+ <family>VL PGothic</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>VL Gothic</family>
+ </prefer>
+ </alias>
+</fontconfig>
diff --git a/japanese/vlgothic/files/63-vlgothic.conf b/japanese/vlgothic/files/63-vlgothic.conf
deleted file mode 100644
index 114290b01f62..000000000000
--- a/japanese/vlgothic/files/63-vlgothic.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<!-- $FreeBSD$ -->
-<fontconfig>
-<alias>
-<family>sans-serif</family>
-<prefer>
-<family>VL PGothic</family>
-</prefer>
-</alias>
-<alias>
-<family>monospace</family>
-<prefer>
-<family>VL Gothic</family>
-</prefer>
-</alias>
-</fontconfig>
diff --git a/japanese/vlgothic/files/pkg-install.in b/japanese/vlgothic/files/pkg-install.in
new file mode 100644
index 000000000000..d3a3e12482d1
--- /dev/null
+++ b/japanese/vlgothic/files/pkg-install.in
@@ -0,0 +1,87 @@
+#!/bin/sh
+# $FreeBSD$
+
+X_FONTSDIR=%%X_FONTSDIR%%/TrueType
+
+catfontsdir ()
+{
+ while read _IN
+ do
+ case "${_IN}" in
+ *-vlgothic-*|[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="fp=y:bw=0.5" ;;
+ c:jisx0201.1976-*) PFIX="fp=n:bw=0.5" ;;
+ p:*) PFIX="fp=y" ;;
+ c:*) PFIX="fp=n" ;;
+ 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
+ do
+ make_xlfd $ENC VL-PGothic-Regular.ttf vlgothic "VL_PGothic" p
+ make_xlfd $ENC VL-Gothic-Regular.ttf vlgothic "VL_Gothic" c
+ 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
+ ;;
+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
+ ;;
+esac