don't install fontconfig file which sets this font as preference for sans-serif [release 0.2.20080216.1-5mamba;Fri Feb 08 2013]

This commit is contained in:
Silvan Calarco 2024-01-05 21:22:58 +01:00
parent fdd8ed0141
commit 3c5a4ae0a2
3 changed files with 126 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# cjkuni-ukai-fonts-ttf
CJK Unifonts are Unicode TrueType fonts derived from original fonts made available by Arphic Technology under "Arphic Public License" and extended by the CJK Unifonts project.

View File

@ -0,0 +1,25 @@
diff -Nru cjkuni-ukai-fonts-ttf-0.2.20080216.1.orig/41-ttf-arphic-ukai.conf cjkuni-ukai-fonts-ttf-0.2.20080216.1/41-ttf-arphic-ukai.conf
--- cjkuni-ukai-fonts-ttf-0.2.20080216.1.orig/41-ttf-arphic-ukai.conf 2008-02-19 07:33:39.000000000 +0100
+++ cjkuni-ukai-fonts-ttf-0.2.20080216.1/41-ttf-arphic-ukai.conf 2013-02-08 11:59:26.166730116 +0100
@@ -6,12 +6,14 @@
Sans-serif faces
-->
<alias>
- <family>AR PL ZenKai Uni</family>
- <family>AR PL ZenKai Uni MBE</family>
- <family>AR PL UKai CN</family>
- <family>AR PL UKai HK</family>
- <family>AR PL UKai TW</family>
- <family>AR PL UKai TW MBE</family>
- <default><family>sans-serif</family></default>
+ <family>sans-serif</family>
+ <prefer>
+ <family>AR PL ZenKai Uni</family>
+ <family>AR PL ZenKai Uni MBE</family>
+ <family>AR PL UKai CN</family>
+ <family>AR PL UKai HK</family>
+ <family>AR PL UKai TW</family>
+ <family>AR PL UKai TW MBE</family>
+ </prefer>
</alias>
</fontconfig>

View File

@ -0,0 +1,99 @@
# openkdj default directory ... or create a new fontconfig.properties.src... fontconfig.%{vendor}.properties.src
%define fontdir %{_datadir}/fonts/chinese/TrueType
Name: cjkuni-ukai-fonts-ttf
Version: 0.2.20080216.1
Release: 5mamba
Summary: Chinese Unicode TrueType font in Kai face
Group: System/Fonts
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.freedesktop.org/wiki/Software/CJKUnifonts
Source: http://us.archive.ubuntu.com/ubuntu/pool/main/t/ttf-arphic-ukai/ttf-arphic-ukai_%{version}.orig.tar.gz
Patch0: cjkuni-ukai-fonts-ttf-0.2.20080216.1-libfontconfig-2.10.patch
License: Arphic Public License
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
#BuildRequires: ttmkfdir
#BuildRequires: mkfontdir
Provides: cjkuni-ukai-ttf-fonts
Obsoletes: cjkuni-ukai-ttf-fonts
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
CJK Unifonts are Unicode TrueType fonts derived from original fonts made available by Arphic Technology under "Arphic Public License" and extended by the CJK Unifonts project.
%prep
%setup -q -c %{name}-%{version}
%patch0 -p1
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{fontdir} %{buildroot}%{_sysconfdir}/fonts/{conf.d,conf.avail}
install -m0644 *.ttc %{buildroot}%{fontdir}/
(
cd %{buildroot}%{fontdir}
ln -sf ukai.ttc ukai.ttf
)
install -m0644 *.conf %{buildroot}%{_sysconfdir}/fonts/conf.avail/
pushd %{buildroot}%{_sysconfdir}/fonts/conf.avail
for f in *.conf; do
ln -s ../conf.avail/$f ../conf.d/$f
done
popd
# don't install as preference for sans-serif
rm -f %{buildroot}%{_sysconfdir}/fonts/conf.d/41-ttf-arphic-ukai.conf
#ttmkfdir -d %{buildroot}%{fontdir} -o %{buildroot}%{fontdir}/fonts.scale
#mkfontdir %{buildroot}%{fontdir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
:
%postun
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
fi
:
%files
%defattr(-,root,root)
%{_sysconfdir}/fonts/conf.avail/*arphic-ukai*.conf
%{_sysconfdir}/fonts/conf.d/*arphic-ukai*.conf
%dir %{fontdir}
%{fontdir}/ukai.*
%doc license
#%doc CONTRIBUTERS FONTLOG Font_Comparison_ZenKai_UKai.*
#%doc INSTALL KNOWN_ISSUES NEWS README* TODO license
%changelog
* Fri Feb 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-5mamba
- don't install fontconfig file which sets this font as preference for sans-serif
* Fri Feb 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-4mamba
- added patch to fix warnings with fontconfig >=2.10
* Mon Mar 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-3mamba
- renamed from cjkuni-ukai-ttf-fonts to cjkuni-ukai-ttf-fonts-ttf
* Mon Feb 21 2011 gil <puntogil@libero.it> 0.2.20080216.1-2mamba
- rebuilt
* Mon Jan 24 2011 gil <puntogil@libero.it> 0.2.20080216.1-1mamba
- package created by autospec