init commit

This commit is contained in:
jiaxiya 2019-12-03 14:12:08 +08:00 committed by jiaxiya
parent 406d4b9ae1
commit 01f994105c
18 changed files with 421 additions and 0 deletions

60
65-0-khmeros-base.conf Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Khmer OS Content</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Khmer OS System</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Content</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS System</string>
</edit>
</match>
</fontconfig>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS Battambang</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Battambang</string>
</edit>
</match>
</fontconfig>

24
65-0-khmeros-bokor.conf Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS Bokor</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Bokor</string>
</edit>
</match>
</fontconfig>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS Fasthand</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Khmer OS Freehand</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Fasthand</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Freehand</string>
</edit>
</match>
</fontconfig>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS Metal Chrieng</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Metal Chrieng</string>
</edit>
</match>
</fontconfig>

60
65-0-khmeros-muol.conf Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS Muol</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Khmer OS Muol Pali</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Khmer OS Muol Light</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Muol</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Muol Pali</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Muol Light</string>
</edit>
</match>
</fontconfig>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!-- Generic names -->
<alias>
<family>Khmer OS Siemreap</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Locale-specific overrides -->
<match>
<test name="lang" compare="contains">
<string>km</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Khmer OS Siemreap</string>
</edit>
</match>
</fontconfig>

BIN
All_KhmerOS_5.0.zip Normal file

Binary file not shown.

17
License.txt Normal file
View File

@ -0,0 +1,17 @@
KhmerOS - font for the Khmer language of Cambodia
Copyright 2007 Danh Hong
This font is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.? See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License along
with this font; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or
visit http://www.gnu.org/licenses/lgpl.html

View File

17
khmeros-base.metainfo.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-base</id>
<metadata_license>CC0-1.0</metadata_license>
<name>Khmer OS</name>
<summary>A set of Cambodian fonts</summary>
<description>
<p>
The Khmer OS fonts include Khmer and Latin alphabets, and they have equivalent
sizes for Khmer and English alphabets, so that when texts mix both it is not
necessary to have different point sizes for the text in each language.
They were created by Danh Hong of the Cambodian Open Institute.
</p>
</description>
<updatecontact>psatpute_at_redhat_dot_com</updatecontact>
<url type="homepage">http://www.khmeros.info/</url>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-battambang</id>
<metadata_license>CC0-1.0</metadata_license>
<extends>khmeros-base</extends>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-bokor</id>
<metadata_license>CC0-1.0</metadata_license>
<extends>khmeros-base</extends>
</component>

94
khmeros-fonts.spec Normal file
View File

@ -0,0 +1,94 @@
%global fontname khmeros
%global fontconf 65-0-%{fontname}
%global common_desc \
The Khmer OS fonts include Khmer and Latin alphabets, and they have equivalent \
sizes for Khmer and English alphabets, so that when texts mix both it is not \
necessary to have different point sizes for the text in each language. \
\
They were created by Danh Hong of the Cambodian Open Institute.
Name: %{fontname}-fonts
Version: 5.0
Release: 1
Summary: Khmer font set created by Danh Hong of the Cambodian Open Institute
License: LGPLv2+
URL: http://www.khmeros.info/en/fonts
Source0: All_KhmerOS_5.0.zip
Source1: 65-0-khmeros-battambang.conf
Source2: 65-0-khmeros-bokor.conf
Source3: 65-0-khmeros-handwritten.conf
Source4: 65-0-khmeros-base.conf
Source5: 65-0-khmeros-metal-chrieng.conf
Source6: 65-0-khmeros-muol.conf
Source7: 65-0-khmeros-siemreap.conf
Source8: License.txt
Source9: %{fontname}-base.metainfo.xml
Source10: %{fontname}-battambang.metainfo.xml
Source11: %{fontname}-bokor.metainfo.xml
Source12: %{fontname}-handwritten.metainfo.xml
Source13: %{fontname}-metal-chrieng.metainfo.xml
Source14: %{fontname}-muol.metainfo.xml
Source15: %{fontname}-siemreap.metainfo.xml
BuildArch: noarch
BuildRequires: fontpackages-devel
Requires: fontpackages-filesystem
%description
%common_desc
%prep
%autosetup -n All_KhmerOS_5.0
install -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
install -p %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} .
%build
%install
mv 'KhmerOS .ttf' KhmerOS.ttf
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
%{buildroot}%{_fontconfig_confdir}
for conffile in *.conf ; do
install -m 0644 -p $conffile %{buildroot}%{_fontconfig_templatedir}/${conffile}
ln -s %{_fontconfig_templatedir}/$conffile \
%{buildroot}%{_fontconfig_confdir}/$conffile
done
# Add AppStream metadata
install -Dm 0644 -p %{SOURCE9} \
%{buildroot}%{_datadir}/appdata/%{fontname}-base.metainfo.xml
install -Dm 0644 -p %{SOURCE10} \
%{buildroot}%{_datadir}/appdata/%{fontname}-battambang.metainfo.xml
install -Dm 0644 -p %{SOURCE11} \
%{buildroot}%{_datadir}/appdata/%{fontname}-bokor.metainfo.xml
install -Dm 0644 -p %{SOURCE12} \
%{buildroot}%{_datadir}/appdata/%{fontname}-handwritten.metainfo.xml
install -Dm 0644 -p %{SOURCE13} \
%{buildroot}%{_datadir}/appdata/%{fontname}-metal-chrieng.metainfo.xml
install -Dm 0644 -p %{SOURCE14} \
%{buildroot}%{_datadir}/appdata/%{fontname}-muol.metainfo.xml
install -Dm 0644 -p %{SOURCE15} \
%{buildroot}%{_datadir}/appdata/%{fontname}-siemreap.metainfo.xml
%files
%license License.txt
%{_datadir}/appdata/%{fontname}-base.metainfo.xml
%{_datadir}/appdata/%{fontname}-battambang.metainfo.xml
%{_datadir}/appdata/%{fontname}-bokor.metainfo.xml
%{_datadir}/appdata/%{fontname}-handwritten.metainfo.xml
%{_datadir}/appdata/%{fontname}-metal-chrieng.metainfo.xml
%{_datadir}/appdata/%{fontname}-muol.metainfo.xml
%{_datadir}/appdata/%{fontname}-siemreap.metainfo.xml
%{_fontconfig_confdir}/*.conf
%{_fontconfig_templatedir}/*.conf
%{_fontdir}/*.ttf
%changelog
* Sat Nov 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 5.0-1
- Package init

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-handwritten</id>
<metadata_license>CC0-1.0</metadata_license>
<extends>khmeros-base</extends>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-metal-chrieng</id>
<metadata_license>CC0-1.0</metadata_license>
<extends>khmeros-base</extends>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-muol</id>
<metadata_license>CC0-1.0</metadata_license>
<extends>khmeros-base</extends>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>khmeros-siemreap</id>
<metadata_license>CC0-1.0</metadata_license>
<extends>khmeros-base</extends>
</component>