View | Details | Raw Unified | Return to bug 278771 | Differences between
and this patch

Collapse All | Expand All

(-)b/japanese/font-bizud-gothic/Makefile (+46 lines)
Added Link Here
1
PORTNAME=	bizud-gothic
2
DISTVERSION=	1.051
3
CATEGORIES=	japanese x11-fonts
4
PKGNAMEPREFIX=	ja-font-
5
6
MAINTAINER=	mew14930xvi@inbox.lv
7
COMMENT=	Morisawa BIZ UD Gothic fonts
8
WWW=		https://github.com/googlefonts/morisawa-biz-ud-gothic
9
10
LICENSE=	OFL11
11
LICENSE_FILE=	${WRKSRC}/OFL.txt
12
13
USES=		fonts:fc
14
FONTPATHSPEC=	${FONTNAME}:pri=60
15
NO_ARCH=	yes
16
NO_BUILD=	yes
17
PKGINSTALL=	${WRKDIR}/pkg-install
18
PKGDEINSTALL=	${WRKDIR}/pkg-install
19
SUB_FILES=	pkg-install
20
PORTDOCS=	AUTHORS.txt CONTRIBUTORS.txt README.md
21
22
USE_GITHUB=	yes
23
GH_ACCOUNT=	googlefonts
24
GH_PROJECT=	morisawa-biz-ud-gothic
25
GH_TAGNAME=	18934af
26
27
OPTIONS_DEFINE=	DOCS
28
29
do-install:
30
	@${MKDIR} ${STAGEDIR}${FONTSDIR}
31
	${INSTALL_DATA} ${WRKSRC}/fonts/ttf/* ${STAGEDIR}${FONTSDIR}
32
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \
33
	    ${STAGEDIR}${PREFIX}/etc/fonts/conf.d
34
	${INSTALL_DATA} ${FILESDIR}/20-unhint-${FONTNAME}.conf \
35
	    ${FILESDIR}/62-fonts-${FONTNAME}.conf \
36
	    ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail
37
	${LN} -s -f ../conf.avail/20-unhint-${FONTNAME}.conf \
38
	    ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${FONTNAME}.conf
39
	${LN} -s -f ../conf.avail/62-fonts-${FONTNAME}.conf \
40
	    ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${FONTNAME}.conf
41
42
post-install-DOCS-on:
43
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
44
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
45
46
.include <bsd.port.mk>
(-)b/japanese/font-bizud-gothic/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1714867958
2
SHA256 (googlefonts-morisawa-biz-ud-gothic-1.051-18934af_GH0.tar.gz) = 4b9e1397283381d77ad0db24a1eec0d2f66689c0acb741e05de95d2fe84eb0f6
3
SIZE (googlefonts-morisawa-biz-ud-gothic-1.051-18934af_GH0.tar.gz) = 36721204
(-)b/japanese/font-bizud-gothic/files/20-unhint-bizud-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>BIZ UDGothic</string>
8
			</test>
9
			<test name="family">
10
				<string>BIZ UDPGothic</string>
11
			</test>
12
		</or>
13
		<edit name="autohint">
14
			<bool>false</bool>
15
		</edit>
16
	</match>
17
</fontconfig>
(-)b/japanese/font-bizud-gothic/files/62-fonts-bizud-gothic.conf (+16 lines)
Added Link Here
1
<?xml version="1.0"?>
2
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3
<fontconfig>
4
	<alias>
5
		<family>sans-serif</family>
6
		<prefer>
7
			<family>BIZ UDPGothic</family>
8
		</prefer>
9
	</alias>
10
	<alias>
11
		<family>monospace</family>
12
		<prefer>
13
			<family>BIZ UDGothic</family>
14
		</prefer>
15
	</alias>
16
</fontconfig>
(-)b/japanese/font-bizud-gothic/files/pkg-install.in (+89 lines)
Added Link Here
1
#!/bin/sh
2
3
catfontsdir ()
4
{
5
    while read _IN
6
    do
7
      case "${_IN}" in
8
      *-morisawa-BIZUD*[Gg]othic-*|[0-9]*|"") ;;
9
      *)       echo ${_IN} ;;
10
      esac
11
    done
12
}
13
14
ROMA=""
15
BOLD="ds=y"
16
ITAL="ai=0.15"
17
OBLI="ai=0.15"
18
RITA="ai=0.08"
19
ROBL="ai=0.08"
20
21
make_xlfd()
22
{
23
	_enc=$1
24
	_file=$2
25
	_vendor=$3
26
	_fname=$4
27
	_poc=$5
28
29
	case "${_poc}:${_enc}" in
30
	p:jisx0201.1976-*)	PFIX="bw=0.5" ;;
31
	c:jisx0201.1976-*)	PFIX="bw=0.5" ;;
32
	p:*)			PFIX="" ;;
33
	c:*)			PFIX="" ;;
34
	esac
35
36
	set --	"${ROMA}"	medium-r \
37
		${BOLD}		bold-r \
38
		${ITAL}		medium-i \
39
		${ITAL}:${BOLD} bold-i \
40
		${OBLI}		medium-o \
41
		${OBLI}:${BOLD}	bold-o \
42
		${RITA}		medium-ri \
43
		${RITA}:${BOLD}	bold-ri \
44
		${ROBL}		medium-ro \
45
		${ROBL}:${BOLD}	bold-ro
46
	while [ $# != 0 ]; do
47
		_prefix="${PFIX}:$1"; shift
48
		_variant=$1; shift
49
		printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \
50
			$_prefix $_file $_vendor $_fname $_variant $_poc $_enc
51
	done | sed -e 's,::,:,g' -e 's,^:,,'
52
}
53
54
addentries ()
55
{
56
	for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0
57
	do
58
		make_xlfd $ENC BIZUDGothic-Bold.ttf morisawa BIZUDGothic c
59
		make_xlfd $ENC BIZUDGothic-Regular.ttf morisawa BIZUDGothic c
60
		make_xlfd $ENC BIZUDPGothic-Bold.ttf morisawa BIZUDPGothic p
61
		make_xlfd $ENC BIZUDPGothic-Regular.ttf morisawa BIZUDPGothic p
62
	done
63
}
64
65
nfonts ()
66
{
67
    _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L}
68
}
69
70
case "$2" in
71
POST-INSTALL)
72
	cd %%FONTSDIR%%
73
	touch fonts.dir
74
	(catfontsdir < fonts.dir; addentries) > fonts.dir.tmp
75
	nfonts < fonts.dir.tmp > fonts.dir
76
	cat fonts.dir.tmp >> fonts.dir
77
	rm -f fonts.dir.tmp
78
	;;
79
POST-DEINSTALL)
80
	cd %%FONTSDIR%%
81
	catfontsdir < fonts.dir > fonts.dir.tmp
82
	nfonts < fonts.dir.tmp > fonts.dir
83
	cat fonts.dir.tmp >> fonts.dir
84
	rm -f fonts.dir.tmp
85
	if [ -r fonts.dir -a `wc -l < fonts.dir` = 1 ]; then
86
		rm -f fonts.dir
87
	fi
88
	;;
89
esac
(-)b/japanese/font-bizud-gothic/pkg-descr (+2 lines)
Added Link Here
1
BIZ UD Gothic is a universal design typeface designed to be easy
2
to read and ideal for education and business documentation.
(-)b/japanese/font-bizud-gothic/pkg-plist (+8 lines)
Added Link Here
1
%%FONTSDIR%%/BIZUDGothic-Bold.ttf
2
%%FONTSDIR%%/BIZUDGothic-Regular.ttf
3
%%FONTSDIR%%/BIZUDPGothic-Bold.ttf
4
%%FONTSDIR%%/BIZUDPGothic-Regular.ttf
5
etc/fonts/conf.avail/20-unhint-bizud-gothic.conf
6
etc/fonts/conf.avail/62-fonts-bizud-gothic.conf
7
etc/fonts/conf.d/20-unhint-bizud-gothic.conf
8
etc/fonts/conf.d/62-fonts-bizud-gothic.conf

Return to bug 278771