auto-import dejavu-fonts-2.8.0-2.fc6 on branch devel from dejavu-fonts-2.8.0-2.fc6.src.rpm

remove all the no-dejavu-variant-in-core workarounds
This commit is contained in:
nim 2006-07-30 20:22:26 +00:00
parent e6e356193a
commit c2a8ce7eeb
8 changed files with 53 additions and 346 deletions

View File

@ -1,36 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/conf.d/00-dejavu-arabic-override.conf
Override DejaVu use in Arabic
© 2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
This file is distributed under the terms of the GNU General
Public License (GPL) version 2. Copies of the GPL can be obtained from:
http://www.gnu.org/licenses/gpl.html
$Id$
-->
<fontconfig>
<match>
<test name="family"><string>DejaVu Sans</string></test>
<test name="lang"><string>ar</string></test>
<edit name="family" mode="assign" binding="same">
<string>KacstQura</string>
</edit>
</match>
<match>
<test name="family"><string>DejaVu Serif</string></test>
<test name="lang"><string>ar</string></test>
<edit name="family" mode="assign" binding="same">
<string>KacstQura</string>
</edit>
</match>
<match>
<test name="family"><string>DejaVu Sans Mono</string></test>
<test name="lang"><string>ar</string></test>
<edit name="family" mode="assign" binding="same">
<string>KacstQuraFixed</string>
</edit>
</match>
</fontconfig>

View File

@ -1,86 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Block DejaVu use with Arabic and Persian
© 2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
This file is distributed under the terms of the GNU General
Public License (GPL) version 2. Copies of the GPL can be obtained from:
http://www.gnu.org/licenses/gpl.html
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-system="fonts.dtd"/>
<!-- Preserve most nodes -->
<xsl:template match="*" priority="0">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
</xsl:template>
<!-- Preserve attributes and comments -->
<xsl:template match="@*|comment()">
<xsl:copy/>
</xsl:template>
<!-- Remove our old blocking code -->
<xsl:template match="fontconfig/match[comment()[.='Added by dejavu-fonts-block']]" priority ="2"/>
<!-- Add Arabic and Persian overrides for default aliases -->
<xsl:template match="fontconfig/dir[position()=last()]" priority ="1">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
<match>
<xsl:comment>Added by dejavu-fonts-block</xsl:comment>
<xsl:comment>Use KacstQura as default sans-serif when lang is Arabic</xsl:comment>
<test name="family"><string>Sans</string></test>
<test name="lang"><string>ar</string></test>
<edit name="family" mode="assign" binding="same">
<string>KacstQura</string>
</edit>
</match>
<match>
<xsl:comment>Added by dejavu-fonts-block</xsl:comment>
<xsl:comment>Use KacstQura as default serif when lang is Arabic</xsl:comment>
<test name="family"><string>Serif</string></test>
<test name="lang"><string>ar</string></test>
<edit name="family" mode="assign" binding="same">
<string>KacstQura</string>
</edit>
</match>
<match>
<xsl:comment>Added by dejavu-fonts-block</xsl:comment>
<xsl:comment>Use KacstQura as default monospace when lang is Arabic</xsl:comment>
<test name="family"><string>Monospace</string></test>
<test name="lang"><string>ar</string></test>
<edit name="family" mode="assign" binding="same">
<string>KacstQuraFixed</string>
</edit>
</match>
<match>
<xsl:comment>Added by dejavu-fonts-block</xsl:comment>
<xsl:comment>Use Roya as default sans-serif when lang is Farsi</xsl:comment>
<test name="family"><string>Sans</string></test>
<test name="lang"><string>fa</string></test>
<edit name="family" mode="assign" binding="same">
<string>Roya</string>
</edit>
</match>
<match>
<xsl:comment>Added by dejavu-fonts-block</xsl:comment>
<xsl:comment>Use Nazli as default serif when lang is Farsi</xsl:comment>
<test name="family"><string>Serif</string></test>
<test name="lang"><string>fa</string></test>
<edit name="family" mode="assign" binding="same">
<string>Nazli</string>
</edit>
</match>
<match>
<xsl:comment>Added by dejavu-fonts-block</xsl:comment>
<xsl:comment>Use Terafik as default monospace when lang is Farsi</xsl:comment>
<test name="family"><string>Monospace</string></test>
<test name="lang"><string>fa</string></test>
<edit name="family" mode="assign" binding="same">
<string>Terafik</string>
</edit>
</match>
</xsl:template>
</xsl:stylesheet>

View File

@ -26,7 +26,14 @@
<family>serif</family>
</default>
</alias>
<!-- Declare DejaVu Sans Condensed a valid Toga Sans substitute -->
<!-- Declare substitutes -->
<alias>
<family>DejaVu LGC Sans Condensed</family>
<accept>
<family>DejaVu LGC Sans Condensed</family>
<family>DejaVu Sans Condensed</family>
</accept>
</alias>
<alias>
<family>Toga Sans</family>
<accept>
@ -34,7 +41,13 @@
<family>DejaVu Sans Condensed</family>
</accept>
</alias>
<!-- Declare DejaVu Serif Condensed a valid Toga Serif substitute -->
<alias>
<family>DejaVu LGC Serif Condensed</family>
<accept>
<family>DejaVu LGC Serif Condensed</family>
<family>DejaVu Serif Condensed</family>
</accept>
</alias>
<alias>
<family>Toga Serif</family>
<accept>

View File

@ -41,6 +41,13 @@
<family>DejaVu Sans</family>
</accept>
</alias>
<alias>
<family>DejaVu LGC Sans</family>
<accept>
<family>DejaVu LGC Sans</family>
<family>DejaVu Sans</family>
</accept>
</alias>
<alias>
<family>Arev Sans</family>
<accept>
@ -92,6 +99,13 @@
<family>DejaVu Serif</family>
</accept>
</alias>
<alias>
<family>DejaVu LGC Serif</family>
<accept>
<family>DejaVu LGC Serif</family>
<family>DejaVu Serif</family>
</accept>
</alias>
<alias>
<family>SUSE Serif</family>
<accept>
@ -122,6 +136,13 @@
<family>DejaVu Sans Mono</family>
</accept>
</alias>
<alias>
<family>DejaVu LGC Sans Mono</family>
<accept>
<family>DejaVu LGC Sans Mono</family>
<family>DejaVu Sans Mono</family>
</accept>
</alias>
<alias>
<family>SUSE Sans Mono</family>
<accept>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Makes DejaVu fonts the fontconfig defaults
© 2003-2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
This file is distributed under the terms of the GNU General
Public License (GPL) version 2. Copies of the GPL can be obtained from:
http://www.gnu.org/licenses/gpl.html
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-system="fonts.dtd"/>
<!-- Preserve most nodes -->
<xsl:template match="*" priority="0">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
</xsl:template>
<!-- Preserve attributes and comments -->
<xsl:template match="@*|comment()">
<xsl:copy/>
</xsl:template>
<!-- Take care of alias priorities -->
<!-- Remove old priorities if they exist -->
<xsl:template match="fontconfig/alias[family = 'serif']/prefer/family[.='DejaVu Serif']" priority="1"/>
<xsl:template match="fontconfig/alias[family = 'sans-serif']/prefer/family[.='DejaVu Sans']" priority="1"/>
<xsl:template match="fontconfig/alias[family = 'monospace']/prefer/family[.='DejaVu Sans Mono']" priority="1"/>
<!-- Register serif alias -->
<xsl:template match="fontconfig/alias[family = 'serif']/prefer/family[1]" priority="1">
<family>DejaVu Serif</family>
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
</xsl:template>
<!-- Register sans-serif alias -->
<xsl:template match="fontconfig/alias[family = 'sans-serif']/prefer/family[1]" priority="1">
<family>DejaVu Sans</family>
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
</xsl:template>
<!-- Register monospace alias -->
<xsl:template match="fontconfig/alias[family = 'monospace']/prefer/family[1]" priority="1">
<family>DejaVu Sans Mono</family>
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,36 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/conf.d/00-dejavu-persian-override.conf
Override DejaVu use in Persian
© 2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
This file is distributed under the terms of the GNU General
Public License (GPL) version 2. Copies of the GPL can be obtained from:
http://www.gnu.org/licenses/gpl.html
$Id$
-->
<fontconfig>
<match>
<test name="family"><string>DejaVu Sans</string></test>
<test name="lang"><string>fa</string></test>
<edit name="family" mode="assign" binding="same">
<string>Roya</string>
</edit>
</match>
<match>
<test name="family"><string>DejaVu Serif</string></test>
<test name="lang"><string>fa</string></test>
<edit name="family" mode="assign" binding="same">
<string>Nazli</string>
</edit>
</match>
<match>
<test name="family"><string>DejaVu Sans Mono</string></test>
<test name="lang"><string>fa</string></test>
<edit name="family" mode="assign" binding="same">
<string>Terafik</string>
</edit>
</match>
</fontconfig>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Blocks DejaVu use with Arabic and Persian
© 2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
This file is distributed under the terms of the GNU General
Public License (GPL) version 2. Copies of the GPL can be obtained from:
http://www.gnu.org/licenses/gpl.html
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-system="fonts.dtd"/>
<!-- Preserve most nodes -->
<xsl:template match="*" priority="0">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*|text()|comment()"/>
</xsl:copy>
</xsl:template>
<!-- Preserve attributes and comments -->
<xsl:template match="@*|comment()">
<xsl:copy/>
</xsl:template>
<!-- Remove our blocking code -->
<xsl:template match="fontconfig/match[comment()[.='Added by dejavu-fonts-block']]" priority ="1"/>
</xsl:stylesheet>

View File

@ -6,7 +6,6 @@
%define archiveversion 2.8
%define fontdir %{_datadir}/fonts/%{name}
%define fontconfdir %{_sysconfdir}/fonts
%define xsldir %{_datadir}/xml/%{name}
# Let the perl Maintainer worry about Unicode.org data files (updates, licensing)
%define Blocks %(eval "$(%{__perl} -V:privlibexp)"; echo $privlibexp)/unicore/Blocks.txt
@ -14,25 +13,16 @@
Name: dejavu-fonts
Version: 2.8.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: DejaVu fonts
Group: User Interface/X
License: Redistributable, with restrictions
URL: http://dejavu.sf.net/
Source: http://prdownloads.sourceforge.net/dejavu/%{archivename}-%{archiveversion}.tar.gz
# Make DejaVu fonts the default in Sans, Serif and Monospace
Source1: %{name}-makedefault.xsl
# Substitute the glyphs of another font in Sans, Serif and Monospace for Arabic and Farsi
Source2: %{name}-block.xsl
Source3: %{name}-unblock.xsl
Source0: http://prdownloads.sourceforge.net/dejavu/%{archivename}-%{archiveversion}.tar.gz
# DejaVu fontconfig setup
Source4: %{name}-fontconfig.conf
Source1: %{name}-fontconfig.conf
# DejaVu fontconfig setup (experimental families)
Source5: %{name}-experimental-fontconfig.conf
# Substitute the glyphs of another font in DejaVu for Farsi
Source6: %{name}-persian-override.conf
# Substitute the glyphs of another font in DejaVu for Arabic
Source7: %{name}-arabic-override.conf
Source2: %{name}-experimental-fontconfig.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: fontforge
# The CPAN sources do not declare perl(Font::TTF)
@ -44,6 +34,10 @@ BuildRequires: %{Blocks} %{UnicodeData}
BuildArch: noarch
Conflicts: fontconfig < 2.3.93
Obsoletes: %{name}-fontconfig < 2.7.0-0.15
Obsoletes: %{name}-makedefault < 2.8.0-0.2
Obsoletes: %{name}-block < 2.8.0-0.2
%description
The DejaVu fonts are a font family based on the Bitstream Vera Fonts release
@ -67,44 +61,6 @@ The DejaVu fonts are a font family based on the Bitstream Vera Fonts release
This package includes the typefaces the DejaVu project considers experimental.
%package makedefault
Group: User Interface/X
Summary: Files needed to make DejaVu the default fontconfig fonts
# Needed for xslt processing of %{fontconfdir}/fonts.conf
Requires: %{_bindir}/xsltproc, /bin/mktemp, %{fontconfdir}/fonts.conf
Obsoletes: %{name}-fontconfig < 2.7.0-0.15
Conflicts: %{name}-fontconfig < 2.7.0-0.15
%description makedefault
The DejaVu fonts are a font family based on the Bitstream Vera Fonts release
1.10. This package will add DejaVu fonts to fontconfig aliases and keep them
there.
It will make DejaVu fonts the first choice in Sans, Sans-Serif and Monospace.
%package block
Group: User Interface/X
Summary: Files needed to block DejaVu use with some scripts
Requires: %{fontconfdir}/conf.d
# Needed for xslt processing of %{fontconfdir}/fonts.conf
Requires: %{_bindir}/xsltproc, /bin/mktemp, %{fontconfdir}/fonts.conf
%description block
The DejaVu fonts are a font family based on the Bitstream Vera Fonts release
1.10. While their glyph coverage and quality is improving every release, they
may not yet be suitable for intensive use for some scripts.
This package will force substitution of DejaVu by other fonts when rendering
one of these scripts. If you need to install it, you probably have
some enhancement suggestions to make at
https://bugs.freedesktop.org/enter_bug.cgi?product=DejaVu or
dejavu-fonts at lists.sourceforge.net
Requests for enhancements or fixes of the blocking code should go to
https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora%20Extras
%prep
%setup -q -n %{archivename}-%{archiveversion}
@ -135,18 +91,10 @@ mv status.txt.new status.txt
install -d -m 0755 %{buildroot}%{fontdir}
install -m 0644 generated/*.ttf %{buildroot}%{fontdir}
#xsl
install -d -m 755 %{buildroot}%{xsldir}
install -p -m 644 %{SOURCE1} %{buildroot}%{xsldir}/makedefault.xsl
install -p -m 644 %{SOURCE2} %{buildroot}%{xsldir}/block.xsl
install -p -m 644 %{SOURCE3} %{buildroot}%{xsldir}/unblock.xsl
# Fontconfig overrides for some scripts
install -d -m 0755 %{buildroot}%{fontconfdir}/conf.d
install -m 0644 %{SOURCE4} %{buildroot}%{fontconfdir}/conf.d/20-dejavu.conf
install -m 0644 %{SOURCE5} %{buildroot}%{fontconfdir}/conf.d/20-dejavu-experimental.conf
install -m 0644 %{SOURCE6} %{buildroot}%{fontconfdir}/conf.d/00-dejavu-persian-override.conf
install -m 0644 %{SOURCE7} %{buildroot}%{fontconfdir}/conf.d/00-dejavu-arabic-override.conf
install -m 0644 %{SOURCE1} %{buildroot}%{fontconfdir}/conf.d/20-dejavu.conf
install -m 0644 %{SOURCE2} %{buildroot}%{fontconfdir}/conf.d/20-dejavu-experimental.conf
%clean
@ -181,38 +129,6 @@ if [ "$1" = "0" ]; then
fi
### Triggers yes I know I'm mad
# I hope this won't be necessary by FC6 time
%triggerin makedefault -- fontconfig, %{fontconfdir}/fonts.conf
if [ -w %{fontconfdir}/fonts.conf ] ; then
TMPFILE=$(/bin/mktemp -q /tmp/fonts.conf.XXXXXX) && \
%{_bindir}/xsltproc --novalid --output $TMPFILE \
%{xsldir}/makedefault.xsl %{fontconfdir}/fonts.conf && \
/bin/cat $TMPFILE > %{fontconfdir}/fonts.conf && /bin/rm $TMPFILE
fi
# These bits do not seem achieveable right now by dumping files in
# %{fontconfdir}/conf.d
%triggerin block -- fontconfig, %{fontconfdir}/fonts.conf
if [ -w %{fontconfdir}/fonts.conf ] ; then
TMPFILE=$(/bin/mktemp -q /tmp/fonts.conf.XXXXXX) && \
%{_bindir}/xsltproc --novalid --output $TMPFILE \
%{xsldir}/block.xsl %{fontconfdir}/fonts.conf && \
/bin/cat $TMPFILE > %{fontconfdir}/fonts.conf && /bin/rm $TMPFILE
fi
%preun block
if [ "$1" = "0" -a -w %{fontconfdir}/fonts.conf ] ; then
TMPFILE=$(/bin/mktemp -q /tmp/fonts.conf.XXXXXX) && \
%{_bindir}/xsltproc --novalid --output $TMPFILE \
%{xsldir}/unblock.xsl %{fontconfdir}/fonts.conf && \
/bin/cat $TMPFILE > %{fontconfdir}/fonts.conf && /bin/rm $TMPFILE
fi
%files
%defattr(0644,root,root,0755)
%doc *.txt AUTHORS BUGS LICENSE NEWS README
@ -236,23 +152,14 @@ fi
%{fontdir}/DejaVuSerif-*Oblique.ttf
%files makedefault
%defattr(0644,root,root,0755)
%dir %{xsldir}
%{xsldir}/makedefault.xsl
%files block
%defattr(0644,root,root,0755)
%dir %{xsldir}
%{xsldir}/block.xsl
%{xsldir}/unblock.xsl
%config %{fontconfdir}/conf.d/00-dejavu-*-override.conf
%changelog
* Sun Jul 30 2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
- 2.8.0-2
- Massive simplification of the spec following dejavu-lgc inclusion in FC. The
removed parts were intended to workaround the fact no dejavu variant was in
core. Since there is one now, and dejavu full only complements the dejavu-lgc
package, the lgc maintainer should take care of the corresponding settings.
* Sun Jul 16 2006 Nicolas Mailhot <nicolas.mailhot at laposte.net>
- 2.8.0-1
- 2.8.0 final