View | Details | Raw Unified | Return to bug 279913
Collapse All | Expand All

(-)b/japanese/font-bizin-gothic/Makefile (+39 lines)
Added Link Here
1
PORTNAME=	bizin-gothic
2
DISTVERSION=	0.0.4
3
DISTVERSIONPREFIX=	v
4
CATEGORIES=	japanese x11-fonts
5
MASTER_SITES=	https://github.com/yuru7/bizin-gothic/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
6
PKGNAMEPREFIX=	ja-font-
7
DISTNAME=	BizinGothic_${DISTVERSIONPREFIX}${DISTVERSION}
8
EXTRACT_SUFX=	.zip
9
10
MAINTAINER=	hiroo.ono+freebsd@gmail.com
11
COMMENT=	Font for programming composed of BizUD gothic and Inconsolata
12
WWW=		https://github.com/yuru7/bizin-gothic
13
14
LICENSE=	OFL11
15
16
USES=		fonts:fc
17
18
FONT_PATHSPEC=	${FONTNAME}:pri=60
19
NO_ARCH=	yes
20
NO_BUILD=	yes
21
PKGINSTALL=	${WRKDIR}/pkg-install
22
PKGDEINSTALL=	${WRKDIR}/pkg-install
23
SUB_FILES=	pkg-install
24
25
do-install:
26
	${MKDIR} ${STAGEDIR}${FONTSDIR}
27
	${INSTALL_DATA} ${WRKSRC}/BizinGothic-Regular.ttf ${STAGEDIR}${FONTSDIR}
28
	${INSTALL_DATA} ${WRKSRC}/BizinGothic-Bold.ttf ${STAGEDIR}${FONTSDIR}
29
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \
30
		${STAGEDIR}${PREFIX}/etc/fonts/conf.d
31
	${INSTALL_DATA} ${FILESDIR}/20-unhint-${FONTNAME}.conf \
32
		${FILESDIR}/62-fonts-${FONTNAME}.conf \
33
		${STAGEDIR}${PREFIX}/etc/fonts/conf.avail
34
	${LN} -s -f ../conf.avail/20-unhint-${FONTNAME}.conf \
35
		${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${FONTNAME}.conf
36
	${LN} -s -f ../conf.avail/62-fonts-${FONTNAME}.conf \
37
		${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${FONTNAME}.conf
38
39
.include <bsd.port.mk>
(-)b/japanese/font-bizin-gothic/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1719067391
2
SHA256 (BizinGothic_v0.0.4.zip) = e9d01c6ba56161c8a68e2998b71508110e2d70742512f6dafde1a569b0fbf877
3
SIZE (BizinGothic_v0.0.4.zip) = 4816233
(-)b/japanese/font-bizin-gothic/files/20-unhint-bizin-gothic.conf (+17 lines)
Added Link Here
1
<?xml version="1.0"?>
2
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3
<fontconfig>
4
	<match target="font">
5
		<or>
6
			<test name="family">
7
				<string>BizinGothic-Regular</string>
8
			</test>
9
			<test name="family">
10
				<string>BizinGothic-Bold</string>
11
			</test>
12
		</or>
13
		<edit name="autohint">
14
			<bool>false</bool>
15
		</edit>
16
	</match>
17
</fontconfig>
(-)b/japanese/font-bizin-gothic/files/62-fonts-bizin-gothic.conf (+11 lines)
Added Link Here
1
<?xml version="1.0"?>
2
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3
<fontconfig>
4
	<alias>
5
		<family>monospace</family>
6
		<prefer>
7
			<family>BizinGothic-Regular</family>
8
			<family>BizinGothic-Bold</family>
9
		</prefer>
10
	</alias>
11
</fontconfig>
(-)b/japanese/font-bizin-gothic/files/pkg-install.in (+101 lines)
Added Link Here
1
#!/bin/sh
2
3
catfontsdir()
4
{
5
	while read _IN
6
	do
7
		case "${_IN}" in
8
		*-misc-bizingothic-* | [0-9]* | "")
9
			;;
10
		*)
11
			echo ${_IN}
12
			;;
13
		esac
14
	done
15
}
16
17
ROMA=""
18
BOLD="ds=y"
19
RITA="ai=0.08"
20
ROBL="ai=0.08"
21
22
make_xlfd()
23
{
24
	_enc=$1
25
	_file=$2
26
	_vendor=$3
27
	_fname=$4
28
	_poc=$5
29
	_weight=$6
30
31
	case "${_poc}:${_enc}" in
32
	p:jisx0201.1976-*)	PFIX="bw=0.5" ;;
33
	c:jisx0201.1976-*)	PFIX="bw=0.5" ;;
34
	p:*)			PFIX="" ;;
35
	c:*)			PFIX="" ;;
36
	esac
37
38
	set --	""	${_weight}-r \
39
		${RITA}	${_weight}-ri \
40
		${ROBL}	${_weight}-ro
41
	while [ $# != 0 ]; do
42
		_prefix="${PFIX}:$1"; shift
43
		_variant=$1; shift
44
		[ ${index_type} = "scale" -a ${_prefix} != ":" ] && continue
45
		printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \
46
		       $_prefix $_file $_vendor "$_fname" $_variant $_poc $_enc
47
	done | sed -e 's,::,:,g' -e 's,^:,,'
48
}
49
50
addentries()
51
{
52
	for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0 jisx0208.1997-0 jisx0213.2004-1
53
	do
54
		make_xlfd $ENC BizinGothic-Regular.ttf misc "bizingothic" m medium
55
		make_xlfd $ENC BizinGothic-Bold.ttf misc "bizingothic" m bold
56
	done
57
}
58
59
nfonts()
60
{
61
    _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L}
62
}
63
64
install_fontsdir()
65
{
66
	index_type=${1:-"dir"}
67
	index="fonts.${index_type}"
68
	tmpfile="${index}.tmp"
69
	touch ${index}
70
	(catfontsdir < ${index}; addentries ${index_type}) > ${tmpfile}
71
	nfonts < ${tmpfile} > ${index}
72
	cat ${tmpfile} >> ${index}
73
	rm -f ${tmpfile}
74
}
75
76
deinstall_fontsdir()
77
{
78
	index_type=${1:-"dir"}
79
	index="fonts.${index_type}"
80
	tmpfile="${index}.tmp"
81
	catfontsdir < ${index} > ${tmpfile}
82
	nfonts < ${tmpfile} > ${index}
83
	cat ${tmpfile} >> ${index}
84
	rm -f ${tmpfile}
85
	if [ -r ${index} -a $(wc -l < ${index}) = 1 ]; then
86
		rm -f ${index}
87
	fi
88
}
89
90
case "$2" in
91
POST-INSTALL)
92
	cd %%FONTSDIR%%
93
	install_fontsdir dir
94
	install_fontsdir scale
95
	;;
96
POST-DEINSTALL)
97
	cd %%FONTSDIR%%
98
	deinstall_fontsdir dir
99
	deinstall_fontsdir scale
100
	;;
101
esac
(-)b/japanese/font-bizin-gothic/pkg-descr (+8 lines)
Added Link Here
1
Bizin Gothic is a font for programming composing the universal
2
design font BizUD Gothic and the latin font Inconsolata.
3
The goal is to combine the eye-friendly glyphs of BIZ UD Gothic
4
and the quirky and beautiful glyphs of Inconsolata without any
5
sense of discomfort.
6
In addition, the specifications for various character
7
adjustments to improve readability in this font were made with
8
Ricty in mind.
(-)b/japanese/font-bizin-gothic/pkg-plist (+6 lines)
Added Link Here
1
etc/fonts/conf.avail/20-unhint-bizin-gothic.conf
2
etc/fonts/conf.avail/62-fonts-bizin-gothic.conf
3
etc/fonts/conf.d/20-unhint-bizin-gothic.conf
4
etc/fonts/conf.d/62-fonts-bizin-gothic.conf
5
%%FONTSDIR%%/BizinGothic-Bold.ttf
6
%%FONTSDIR%%/BizinGothic-Regular.ttf

Return to bug 279913