[packages/fonts-OTF-Adobe-SourceHanSans] - initial
arekm
arekm at pld-linux.org
Tue Apr 21 14:42:59 CEST 2015
commit fefbb6997f4721afac981f068a2707b54c6fa342
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Apr 21 14:42:44 2015 +0200
- initial
44-source-han-sans-cn.conf | 18 ++++++++++
44-source-han-sans-jp.conf | 18 ++++++++++
44-source-han-sans-kr.conf | 18 ++++++++++
44-source-han-sans-otc.conf | 42 +++++++++++++++++++++++
44-source-han-sans-tw.conf | 18 ++++++++++
fonts-OTF-Adobe-SourceHanSans.spec | 69 ++++++++++++++++++++++++++++++++++++++
6 files changed, 183 insertions(+)
---
diff --git a/fonts-OTF-Adobe-SourceHanSans.spec b/fonts-OTF-Adobe-SourceHanSans.spec
new file mode 100644
index 0000000..5a1ba56
--- /dev/null
+++ b/fonts-OTF-Adobe-SourceHanSans.spec
@@ -0,0 +1,69 @@
+# TODO:
+# - split into separate cn/jp/kr/otc/tw subpackages
+Summary: Adobe Source HanSans
+Name: fonts-OTF-Adobe-SourceHanSans
+Version: 1.002
+Release: 1
+License: OFL v1.1
+Group: Fonts
+Source0: https://github.com/adobe-fonts/source-han-sans/archive/1.002R.tar.gz
+# Source0-md5: 6b7f44a2e15f585a3ff5eff7754edb32
+Source1: 44-source-han-sans-cn.conf
+Source2: 44-source-han-sans-jp.conf
+Source3: 44-source-han-sans-kr.conf
+Source4: 44-source-han-sans-otc.conf
+Source5: 44-source-han-sans-tw.conf
+URL: https://github.com/adobe-fonts/source-han-sans
+BuildRequires: unzip
+Requires(post,postun): fontpostinst
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define otffontsdir %{_fontsdir}/OTF
+
+%description
+Source Han Sans is a set of OpenType/CFF Pan-CJK fonts.
+
+%prep
+%setup -q -n source-han-sans-%{version}R
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{otffontsdir},%{_datadir}/fontconfig/conf.avail,%{_sysconfdir}/fonts/conf.d}
+
+find . -type f -name '*.otf' -exec install -vp "{}" "$RPM_BUILD_ROOT%{otffontsdir}" ";"
+
+install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/fontconfig/conf.avail/44-source-han-sans-cn.conf
+install -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/fontconfig/conf.avail/44-source-han-sans-jp.conf
+install -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/fontconfig/conf.avail/44-source-han-sans-kr.conf
+install -p %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/fontconfig/conf.avail/44-source-han-sans-otc.conf
+install -p %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/fontconfig/conf.avail/44-source-han-sans-tw.conf
+ln -s %{_datadir}/fontconfig/conf.avail/44-source-han-sans-cn.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
+ln -s %{_datadir}/fontconfig/conf.avail/44-source-han-sans-jp.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
+ln -s %{_datadir}/fontconfig/conf.avail/44-source-han-sans-kr.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
+ln -s %{_datadir}/fontconfig/conf.avail/44-source-han-sans-otc.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
+ln -s %{_datadir}/fontconfig/conf.avail/44-source-han-sans-tw.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+fontpostinst OTF
+
+%postun
+fontpostinst OTF
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.md
+%{otffontsdir}/SourceHanSans*.otf
+%{_sysconfdir}/fonts/conf.d/44-source-han-sans-cn.conf
+%{_sysconfdir}/fonts/conf.d/44-source-han-sans-jp.conf
+%{_sysconfdir}/fonts/conf.d/44-source-han-sans-kr.conf
+%{_sysconfdir}/fonts/conf.d/44-source-han-sans-otc.conf
+%{_sysconfdir}/fonts/conf.d/44-source-han-sans-tw.conf
+%{_datadir}/fontconfig/conf.avail/44-source-han-sans-cn.conf
+%{_datadir}/fontconfig/conf.avail/44-source-han-sans-jp.conf
+%{_datadir}/fontconfig/conf.avail/44-source-han-sans-kr.conf
+%{_datadir}/fontconfig/conf.avail/44-source-han-sans-otc.conf
+%{_datadir}/fontconfig/conf.avail/44-source-han-sans-tw.conf
diff --git a/44-source-han-sans-cn.conf b/44-source-han-sans-cn.conf
new file mode 100644
index 0000000..dce414b
--- /dev/null
+++ b/44-source-han-sans-cn.conf
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
+<fontconfig>
+ <!--
+ - Medium variant is used instead of Regular on Qt apps:
+ https://bugs.launchpad.net/ubuntu-font-family/+bug/744812
+ - Medium and Bold looks the same in certain applications:
+ https://bugs.launchpad.net/ubuntu/+source/gnome-specimen/+bug/813373
+ -->
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans CN Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/44-source-han-sans-jp.conf b/44-source-han-sans-jp.conf
new file mode 100644
index 0000000..4983473
--- /dev/null
+++ b/44-source-han-sans-jp.conf
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
+<fontconfig>
+ <!--
+ - Medium variant is used instead of Regular on Qt apps:
+ https://bugs.launchpad.net/ubuntu-font-family/+bug/744812
+ - Medium and Bold looks the same in certain applications:
+ https://bugs.launchpad.net/ubuntu/+source/gnome-specimen/+bug/813373
+ -->
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans JP Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/44-source-han-sans-kr.conf b/44-source-han-sans-kr.conf
new file mode 100644
index 0000000..3c54813
--- /dev/null
+++ b/44-source-han-sans-kr.conf
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
+<fontconfig>
+ <!--
+ - Medium variant is used instead of Regular on Qt apps:
+ https://bugs.launchpad.net/ubuntu-font-family/+bug/744812
+ - Medium and Bold looks the same in certain applications:
+ https://bugs.launchpad.net/ubuntu/+source/gnome-specimen/+bug/813373
+ -->
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans KR Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/44-source-han-sans-otc.conf b/44-source-han-sans-otc.conf
new file mode 100644
index 0000000..319b4cc
--- /dev/null
+++ b/44-source-han-sans-otc.conf
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
+<fontconfig>
+ <!--
+ - Medium variant is used instead of Regular on Qt apps:
+ https://bugs.launchpad.net/ubuntu-font-family/+bug/744812
+ - Medium and Bold looks the same in certain applications:
+ https://bugs.launchpad.net/ubuntu/+source/gnome-specimen/+bug/813373
+ -->
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans J Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans K Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans SC Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans TC Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/44-source-han-sans-tw.conf b/44-source-han-sans-tw.conf
new file mode 100644
index 0000000..161537b
--- /dev/null
+++ b/44-source-han-sans-tw.conf
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
+<fontconfig>
+ <!--
+ - Medium variant is used instead of Regular on Qt apps:
+ https://bugs.launchpad.net/ubuntu-font-family/+bug/744812
+ - Medium and Bold looks the same in certain applications:
+ https://bugs.launchpad.net/ubuntu/+source/gnome-specimen/+bug/813373
+ -->
+ <match target="scan">
+ <test name="fullname" compare="eq">
+ <string>Source Han Sans TWHK Medium</string>
+ </test>
+ <edit name="weight" mode="assign">
+ <const>demibold</const>
+ </edit>
+ </match>
+</fontconfig>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fonts-OTF-Adobe-SourceHanSans.git/commitdiff/fefbb6997f4721afac981f068a2707b54c6fa342
More information about the pld-cvs-commit
mailing list