]> git.pld-linux.org Git - packages/fonts-OTF-Adobe-SourceHanSans.git/commitdiff
- initial
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 21 Apr 2015 12:42:44 +0000 (14:42 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 21 Apr 2015 12:42:44 +0000 (14:42 +0200)
44-source-han-sans-cn.conf [new file with mode: 0644]
44-source-han-sans-jp.conf [new file with mode: 0644]
44-source-han-sans-kr.conf [new file with mode: 0644]
44-source-han-sans-otc.conf [new file with mode: 0644]
44-source-han-sans-tw.conf [new file with mode: 0644]
fonts-OTF-Adobe-SourceHanSans.spec [new file with mode: 0644]

diff --git a/44-source-han-sans-cn.conf b/44-source-han-sans-cn.conf
new file mode 100644 (file)
index 0000000..dce414b
--- /dev/null
@@ -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 (file)
index 0000000..4983473
--- /dev/null
@@ -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 (file)
index 0000000..3c54813
--- /dev/null
@@ -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 (file)
index 0000000..319b4cc
--- /dev/null
@@ -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 (file)
index 0000000..161537b
--- /dev/null
@@ -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>
diff --git a/fonts-OTF-Adobe-SourceHanSans.spec b/fonts-OTF-Adobe-SourceHanSans.spec
new file mode 100644 (file)
index 0000000..5a1ba56
--- /dev/null
@@ -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
This page took 0.126179 seconds and 4 git commands to generate.