Package Init

This commit is contained in:
qiegewala 2020-02-14 12:17:22 +08:00
parent 50b593adad
commit 2e83ebf4c6
7 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1,45 @@
--- madan/madan.sfd.old 2017-03-13 13:58:43.222651696 +0530
+++ madan/madan.sfd 2017-03-13 14:04:19.735250509 +0530
@@ -524,7 +524,7 @@
AntiAlias: 1
FitToEm: 0
AnchorClass2: "Anchor-0" "'abvm' Above Base Mark in Devanagari lookup 0 subtable" "Anchor-1" "'abvm' Above Base Mark in Devanagari lookup 1 subtable" "Anchor-2" "'abvm' Above Base Mark in Devanagari lookup 2 subtable" "Anchor-3" "'abvm' Above Base Mark in Devanagari lookup 4 subtable" "Anchor-4" "'abvm' Above Base Mark in Devanagari lookup 5 subtable" "Anchor-5" "'blwm' Below Base Mark in Devanagari lookup 6 subtable" "Anchor-6" "'blwm' Below Base Mark in Devanagari lookup 7 subtable"
-BeginChars: 65889 464
+BeginChars: 65890 465
StartChar: .notdef
Encoding: 65536 -1 0
@@ -106551,5 +106551,33 @@
Flags: W
LayerCount: 2
EndChar
+
+StartChar: uni0970
+Encoding: 65889 2416 464
+Width: 992
+Flags: W
+LayerCount: 2
+Fore
+SplineSet
+498 860 m 0,0,1
+ 590 860 590 860 655 927 c 128,-1,2
+ 720 994 720 994 720 1090 c 128,-1,3
+ 720 1186 720 1186 655 1252 c 128,-1,4
+ 590 1318 590 1318 498 1318 c 0,5,6
+ 408 1318 408 1318 343 1252 c 128,-1,7
+ 278 1186 278 1186 278 1090 c 128,-1,8
+ 278 994 278 994 343 927 c 128,-1,9
+ 408 860 408 860 498 860 c 0,0,1
+496 748 m 128,-1,11
+ 352 748 352 748 251 848 c 128,-1,12
+ 150 948 150 948 150 1090 c 0,13,14
+ 150 1230 150 1230 251 1330 c 128,-1,15
+ 352 1430 352 1430 496 1430 c 128,-1,16
+ 640 1430 640 1430 741 1330 c 128,-1,17
+ 842 1230 842 1230 842 1090 c 0,18,19
+ 842 948 842 948 741 848 c 128,-1,10
+ 640 748 640 748 496 748 c 128,-1,11
+EndSplineSet
+EndChar
EndChars
EndSplineFont

View File

@ -0,0 +1,43 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="scan">
<test name="family">
<string>Madan2</string>
</test>
<edit name="family">
<string>Madan</string>
</edit>
<edit name="fullname">
<string>Madan</string>
</edit>
</match>
<alias binding="same">
<family>Madan2</family>
<accept>
<family>Madan</family>
</accept>
</alias>
<match>
<test name="lang">
<string>ne-np</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" >
<string>Madan</string>
</edit>
</match>
<match target="font">
<test name="family" compare="eq">
<string>Madan</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>

59
madan-fonts.spec Normal file
View File

@ -0,0 +1,59 @@
%global fontconf 65-0-madan.conf
#Basic Information
Name: madan-fonts
Version: 2.000
Release: 24
Summary: Font for Nepali language
License: GPL+
URL: http://madanpuraskar.org/
Source0: http://ltk.org.np/downloads/madan.zip
Source1: %{name}-fontconfig.conf
Source2: ttf2sfd.pe
Source3: sfd2ttf.pe
Source4: madan.metainfo.xml
Patch0: madan-fonts-2.000-bug842965-u0970-ff2.patch
#Dependency
BuildRequires: fontforge fontpackages-devel dos2unix
Requires: fontpackages-filesystem
BuildArch: noarch
%description
This package provides the Madan font for Nepali made by the
Madan Puraskar Pustakalaya project.
#Build sections
%prep
%setup -c -q
dos2unix madan/license.txt
cp -p %{SOURCE2} %{SOURCE3} .
chmod 755 ttf2sfd.pe sfd2ttf.pe
./ttf2sfd.pe madan/*.ttf
rm -rf madan/*ttf
%patch0 -p0 -b .added-u0970-character
./sfd2ttf.pe madan/*.sfd
%build
# Do Nothing in Build section
%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p madan/*.ttf %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} %{buildroot}%{_fontconfig_confdir}
install -m 0644 -p %{SOURCE1} %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
ln -s %{_fontconfig_templatedir}/%{fontconf} %{buildroot}%{_fontconfig_confdir}/%{fontconf}
install -Dm 0644 -p %{SOURCE4} %{buildroot}%{_datadir}/appdata/madan.metainfo.xml
#Files list
%_font_pkg -f %{fontconf} *.ttf
%license madan/license.txt
%{_datadir}/appdata/madan.metainfo.xml
%changelog
* Tue Jan 21 2020 lihao <lihao129@huawei.com> - 2.000-24
- Package Init

16
madan.metainfo.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="font">
<id>madan</id>
<metadata_license>CC-BY-3.0</metadata_license>
<name>Madan</name>
<summary>Font for Nepali language</summary>
<description>
<p>
This package provides the Madan font for Nepali made by the
Madan Puraskar Pustakalaya project.
</p>
</description>
<screenshots>
<screenshot>http://madanpuraskar.org/wp-content/uploads/2019/11/mpp_appeal-1024x384.jpg</screenshot>
</screenshots>
</component>

BIN
madan.zip Normal file

Binary file not shown.

8
sfd2ttf.pe Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env fontforge
Print( " ")
Print( "Generating ttf from sfd sources...")
Print( "----------------------------------")
Open($1)
Generate($1:r + ".ttf", "", 0x800)
Print( " ")

8
ttf2sfd.pe Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env fontforge
Print( " ")
Print( "Generating sfd from ttf sources...")
Print( "----------------------------------")
Open($1)
Save($1:r + ".sfd")
Print( " ")