don't install fontconfig file which makes this font default for serif,sans-serif and monospace [release 0.2.20080216.1-6mamba;Fri Feb 08 2013]

This commit is contained in:
Silvan Calarco 2024-01-05 21:23:04 +01:00
parent a19c8af4df
commit cfe3c48e37
7 changed files with 355 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# cjkuni-uming-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,12 @@
diff -Nru chinese-fonts-ttf-0.2.20080216.1.orig/25-ttf-arphic-uming-bitmaps.conf chinese-fonts-ttf-0.2.20080216.1/25-ttf-arphic-uming-bitmaps.conf
--- chinese-fonts-ttf-0.2.20080216.1.orig/25-ttf-arphic-uming-bitmaps.conf 2008-02-19 07:27:06.000000000 +0100
+++ chinese-fonts-ttf-0.2.20080216.1/25-ttf-arphic-uming-bitmaps.conf 2009-09-09 16:17:06.465739868 +0200
@@ -9,7 +9,7 @@
<string>AR PL UMing TW</string>
<string>AR PL UMing TW MBE</string>
</test>
- <edit name="antialias"><bool>false</bool></edit>
+ <edit name="antialias"><bool>true</bool></edit>
<edit name="hinting"><bool>true</bool></edit>
<edit name="autohint"><bool>false</bool></edit>
</match>

View File

@ -0,0 +1,112 @@
diff -Nru cjkuni-uming-fonts-ttf-0.2.20080216.1.orig/25-ttf-arphic-uming-bitmaps.conf cjkuni-uming-fonts-ttf-0.2.20080216.1/25-ttf-arphic-uming-bitmaps.conf
--- cjkuni-uming-fonts-ttf-0.2.20080216.1.orig/25-ttf-arphic-uming-bitmaps.conf 2013-02-08 12:03:13.039314426 +0100
+++ cjkuni-uming-fonts-ttf-0.2.20080216.1/25-ttf-arphic-uming-bitmaps.conf 2013-02-08 12:04:49.563289427 +0100
@@ -4,10 +4,16 @@
<match target="font">
<test name="family">
- <string>AR PL UMing CN</string>
- <string>AR PL UMing HK</string>
- <string>AR PL UMing TW</string>
- <string>AR PL UMing TW MBE</string>
+ <string>AR PL UMing CN</string>
+ </test>
+ <test name="family">
+ <string>AR PL UMing HK</string>
+ </test>
+ <test name="family">
+ <string>AR PL UMing TW</string>
+ </test>
+ <test name="family">
+ <string>AR PL UMing TW MBE</string>
</test>
<edit name="antialias"><bool>true</bool></edit>
<edit name="hinting"><bool>true</bool></edit>
@@ -16,10 +22,16 @@
<match target="font">
<test name="family">
- <string>AR PL UMing CN</string>
- <string>AR PL UMing HK</string>
- <string>AR PL UMing TW</string>
- <string>AR PL UMing TW MBE</string>
+ <string>AR PL UMing CN</string>
+ </test>
+ <test name="family">
+ <string>AR PL UMing HK</string>
+ </test>
+ <test name="family">
+ <string>AR PL UMing TW</string>
+ </test>
+ <test name="family">
+ <string>AR PL UMing TW MBE</string>
</test>
<test name="pixelsize" compare="more_eq"><int>17</int></test>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
diff -Nru cjkuni-uming-fonts-ttf-0.2.20080216.1.orig/41-ttf-arphic-uming.conf cjkuni-uming-fonts-ttf-0.2.20080216.1/41-ttf-arphic-uming.conf
--- cjkuni-uming-fonts-ttf-0.2.20080216.1.orig/41-ttf-arphic-uming.conf 2008-02-19 07:26:39.000000000 +0100
+++ cjkuni-uming-fonts-ttf-0.2.20080216.1/41-ttf-arphic-uming.conf 2013-02-08 12:04:38.331408620 +0100
@@ -6,36 +6,42 @@
Serif faces
-->
<alias>
- <family>AR PL ShanHeiSun Uni</family>
- <family>AR PL ShanHeiSun Uni MBE</family>
- <family>AR PL UMing CN</family>
- <family>AR PL UMing HK</family>
- <family>AR PL UMing TW</family>
- <family>AR PL UMing TW MBE</family>
- <default><family>serif</family></default>
+ <family>serif</family>
+ <prefer>
+ <family>AR PL ShanHeiSun Uni</family>
+ <family>AR PL ShanHeiSun Uni MBE</family>
+ <family>AR PL UMing CN</family>
+ <family>AR PL UMing HK</family>
+ <family>AR PL UMing TW</family>
+ <family>AR PL UMing TW MBE</family>
+ </prefer>
</alias>
<!--
Sans-serif faces
-->
<alias>
- <family>AR PL ShanHeiSun Uni</family>
- <family>AR PL ShanHeiSun Uni MBE</family>
- <family>AR PL UMing CN</family>
- <family>AR PL UMing HK</family>
- <family>AR PL UMing TW</family>
- <family>AR PL UMing TW MBE</family>
- <default><family>sans-serif</family></default>
+ <family>sans-serif</family>
+ <prefer>
+ <family>AR PL ShanHeiSun Uni</family>
+ <family>AR PL ShanHeiSun Uni MBE</family>
+ <family>AR PL UMing CN</family>
+ <family>AR PL UMing HK</family>
+ <family>AR PL UMing TW</family>
+ <family>AR PL UMing TW MBE</family>
+ </prefer>
</alias>
<!--
Monospace faces
-->
<alias>
- <family>AR PL ShanHeiSun Uni</family>
- <family>AR PL ShanHeiSun Uni MBE</family>
- <family>AR PL UMing CN</family>
- <family>AR PL UMing HK</family>
- <family>AR PL UMing TW</family>
- <family>AR PL UMing TW MBE</family>
- <default><family>monospace</family></default>
+ <family>monospace</family>
+ <prefer>
+ <family>AR PL ShanHeiSun Uni</family>
+ <family>AR PL ShanHeiSun Uni MBE</family>
+ <family>AR PL UMing CN</family>
+ <family>AR PL UMing HK</family>
+ <family>AR PL UMing TW</family>
+ <family>AR PL UMing TW MBE</family>
+ </prefer>
</alias>
</fontconfig>

115
cjkuni-uming-fonts-ttf.spec Normal file
View File

@ -0,0 +1,115 @@
# openkdj default directory ... or create a new fontconfig.properties.src... fontconfig.%{vendor}.properties.src
%define fontdir %{_datadir}/fonts/chinese/TrueType
Name: cjkuni-uming-fonts-ttf
Version: 0.2.20080216.1
Release: 6mamba
Summary: Chinese Unicode TrueType font in Ming face
Group: System/Fonts
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.freedesktop.org/wiki/Software/CJKUnifonts
Source0: http://ftp.de.debian.org/debian/pool/main/t/ttf-arphic-uming/ttf-arphic-uming_%{version}.orig.tar.gz
Source1: cjkuni-uming-ttf-fonts-0.2.20080216.1-arphic-uming.conf
Source2: cjkuni-uming-ttf-fonts-0.2.20080216.1-arphic-uming-render.conf
Source3: cjkuni-uming-ttf-fonts-0.2.20080216.1-arphic-uming-embolden.conf
Patch0: chinese-fonts-ttf-0.2.20080216.1-enable_symbol_antialiasing.patch
Patch1: cjkuni-uming-fonts-ttf-0.2.20080216.1-libfontconfig-2.10.patch
License: Arphic Public License
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
#BuildRequires: ttmkfdir
#BuildRequires: mkfontdir
Obsoletes: chinese-fonts-ttf
Provides: chinese-fonts-ttf
Provides: cjkuni-uming-ttf-fonts
Obsoletes: cjkuni-uming-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
%patch1 -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 uming.ttc uming.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 configuration which sets this font as default for serif, sans-serif and monospace
rm -f %{buildroot}%{_sysconfdir}/fonts/conf.d/41-ttf-arphic-uming.conf
install -m0644 fonts.dir %{buildroot}%{fontdir}/
install -m0644 fonts.scale %{buildroot}%{fontdir}/
#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-uming*.conf
%{_sysconfdir}/fonts/conf.d/*arphic-uming*.conf
%dir %{fontdir}
%{fontdir}/uming.*
%{fontdir}/fonts.dir
%{fontdir}/fonts.scale
%doc license
#%doc CONTRIBUTERS FONTLOG Font_Comparison_ShanHeiSun_UMing.*
#%doc INSTALL KNOWN_ISSUES NEWS README* TODO license
%changelog
* Fri Feb 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-6mamba
- don't install fontconfig file which makes this font default for serif,sans-serif and monospace
* Fri Feb 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-5mamba
- added patch to fix warnings with fontconfig >= 2.10
* Mon Mar 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.20080216.1-4mamba
- rename from cjkuni-uming-ttf-fonts to cjkuni-uming-fonts-ttf
* Mon Feb 21 2011 gil <puntogil@libero.it> 0.2.20080216.1-3mamba
- rebuilt
* Wed Feb 16 2011 gil <puntogil@libero.it> 0.2.20080216.1-2mamba
- obsoletes chinese-fonts-ttf
- apply chinese-fonts-ttf-0.2.20080216.1-enable_symbol_antialiasing.patch
* Mon Jan 24 2011 gil <puntogil@libero.it> 0.2.20080216.1-1mamba
- package created by autospec

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<test name="family" compare="contains" >
<string>AR PL UMing</string>
</test>
<!-- check to see if the font is just regular -->
<test name="weight" compare="less_eq">
<int>100</int>
</test>
<test compare="more_eq" target="pattern" name="weight" >
<int>180</int>
</test>
<edit mode="assign" name="embolden" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

View File

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<test name="family" compare="contains" >
<string>AR PL UMing</string>
</test>
<edit name="globaladvance"><bool>false</bool></edit>
<edit name="spacing"><int>90</int></edit>
<edit name="minspace"><bool>false</bool></edit>
</match>
</fontconfig>

View File

@ -0,0 +1,81 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="lang">
<string>zh-hk</string>
<string>zh-tw</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend">
<string>AR PL UMing TW</string>
<string>AR PL UMing HK</string>
</edit>
</match>
<alias>
<family>AR PL UMing TW</family>
<default>
<family>serif</family>
</default>
</alias>
<alias>
<family>AR PL UMing HK</family>
<default>
<family>serif</family>
</default>
</alias>
<match>
<test name="lang">
<string>zh-hk</string>
<string>zh-tw</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>AR PL UMing TW</string>
<string>AR PL UMing HK</string>
</edit>
</match>
<alias>
<family>AR PL UMing TW</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>AR PL UMing HK</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<match>
<test name="lang">
<string>zh-hk</string>
<string>zh-tw</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>AR PL UMing TW</string>
<string>AR PL UMing HK</string>
</edit>
</match>
<alias>
<family>AR PL UMing TW</family>
<default>
<family>monospace</family>
</default>
</alias>
<alias>
<family>AR PL UMing HK</family>
<default>
<family>monospace</family>
</default>
</alias>
</fontconfig>