Source

frdd-overlay / media-fonts / pt-sans / pt-sans-2.003.ebuild

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit font

DESCRIPTION="Font family for Latin and Cyrillic alphabets supporting minority languages of Russia"
HOMEPAGE="http://www.paratype.com/public/ http://www.paratype.ru/public/"

# ParaType only provides the latest version of the font for download at
# http://www.fontstock.com/public/PTSans.zip
#
# The version number of the font package is the greatest version string in ttf
# files (different ttf files may have different versions); it can be extracted
# using fontforge or grep --binary-files=text 'Version ' *.ttf
SRC_URI="http://www.fontstock.com/public/PTSans.zip"

LICENSE="|| ( OFL-1.1 pt-sans )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="web"

DEPEND="app-arch/unzip"

FONT_CONF=( "${FILESDIR}/90-pt-sans-no-bitmaps.conf" )
FONT_SUFFIX="ttf"
use web && FONT_SUFFIX="${FONT_SUFFIX} eot woff"

src_unpack() {
	mkdir $P && cd $P && unzip -q "${DISTDIR}/PTSans.zip" || \
		die "Failed to unpack PTSans.zip"
}

src_install() {
	font_src_install
}

pkg_postinst() {
	font_pkg_postinst
	elog
	elog "PT Sans by default uses embedded bitmaps at small font sizes."
	elog "To disable embedded bitmaps, use the following command:"
	elog "  eselect fontconfig enable 90-pt-sans-no-bitmaps.conf"
	elog "(You will need to have app-admin/eselect-fontconfig installed.)"
}