Package Init

This commit is contained in:
qiegewala 2020-02-28 16:59:08 +08:00
parent 6eba1e3745
commit ad7a603037
3 changed files with 163 additions and 0 deletions

101
fix-stem-width-offset.patch Normal file
View File

@ -0,0 +1,101 @@
From f18b7c859c92111446ca991743dd709e347d0301 Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Sat, 6 Oct 2018 09:04:35 +0200
Subject: [PATCH] tafpgm.c: Fix stem width offset handling in storage area.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
---
lib/tabytecode.h | 5 +++++
lib/tafpgm.c | 24 ++++++++----------------
3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/lib/tabytecode.h b/lib/tabytecode.h
index c35a3fa..8851241 100644
--- a/lib/tabytecode.h
+++ b/lib/tabytecode.h
@@ -301,6 +301,7 @@
/* symbolic names for storage area locations */
+/* 0 */
#define sal_i 0
#define sal_j sal_i + 1
#define sal_k sal_j + 1
@@ -311,6 +312,8 @@
#define sal_best sal_temp3 + 1
#define sal_ref sal_best + 1
#define sal_func sal_ref + 1
+
+/* 10 */
#define sal_anchor sal_func + 1
#define sal_stem_width_function sal_anchor + 1
#define sal_base_delta sal_stem_width_function + 1
@@ -321,6 +324,8 @@
#define sal_base sal_point_max + 1
#define sal_num_packed_segments sal_base + 1
#define sal_num_stem_widths sal_num_packed_segments + 1
+
+/* 20 */
#define sal_stem_width_offset sal_num_stem_widths + 1
#define sal_have_cached_width sal_stem_width_offset + 1
#define sal_cached_width_offset sal_have_cached_width + 1
diff --git a/lib/tafpgm.c b/lib/tafpgm.c
index 7057cf4..2274b27 100644
--- a/lib/tafpgm.c
+++ b/lib/tafpgm.c
@@ -378,7 +378,7 @@ static const unsigned char FPGM(bci_quantize_stem_width) [] =
sal_k,
RS,
EQ, /* sal_limit == sal_k ? */
- JROT,/* goto not_in_array */
+ JROT, /* goto not_in_array */
DUP,
PUSHB_1,
@@ -2068,6 +2068,7 @@ static const unsigned char FPGM(bci_create_segment) [] =
* sal_num_packed_segments
* sal_base (the base for delta values in nibbles)
* sal_vwidth_data_offset
+ * sal_stem_width_offset
* sal_scale
*
* CVT: cvtl_is_subglyph
@@ -2129,16 +2130,7 @@ static const unsigned char FPGM(bci_create_segments_b) [] =
WS, /* sal_vwidth_data_offset = data_offset + num_used_styles */
DUP,
- PUSHB_1,
- sal_stem_width_offset,
- SWAP,
- WS, /* sal_stem_width_offset = num_segments (more to come) */
-
- DUP,
- ADD,
- PUSHB_1,
- 1,
- SUB, /* delta = (2*num_segments - 1) */
+ ADD, /* delta = 2*num_segments */
PUSHB_8,
sal_segment_offset,
@@ -2160,12 +2152,12 @@ static const unsigned char FPGM(bci_create_segments_b) [] =
DUP,
PUSHB_1,
sal_stem_width_offset,
- RS,
- ADD,
- PUSHB_1,
- sal_stem_width_offset,
SWAP,
- WS, /* sal_stem_width_offset += sal_segment_offset + delta */
+ WS, /* sal_stem_width_offset = sal_segment_offset + delta */
+
+ PUSHB_1,
+ 1,
+ SUB, /* s: ... sal_segment_offset (sal_segment_offset + delta - 1) */
PUSHB_2,
bci_create_segment,
--
2.10.5.GIT

BIN
ttfautohint-1.8.2.tar.gz Normal file

Binary file not shown.

62
ttfautohint.spec Normal file
View File

@ -0,0 +1,62 @@
Name: ttfautohint
Version: 1.8.2
Release: 2
Summary: A platform for finely hand-hinting
License: FTL or GPLv2
URL: http://www.freetype.org/ttfautohint
Source0: http://download.savannah.gnu.org/releases/freetype/%{name}-%{version}.tar.gz
Patch0000: fix-stem-width-offset.patch
BuildRequires: gcc gcc-c++ freetype-devel harfbuzz-devel pkgconfig qt5-qtbase-devel
Provides: bundled(gnulib) %{name}-gui = %{version}-%{release} %{name}-libs = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
Obsoletes: %{name}-gui < %{version}-%{release} %{name}-libs < %{version}-%{release}
%description
ttfautohint provides a 99% automated hinting process and a platform for finely
hand-hinting the last 1%. It is ideal for web fonts and supports many scripts:
Latin, Greek, Arabic, Devanagari, Hebrew, Khmer, Myanmar, Thai, and many more.
%package devel
Summary: Development library for ttfautohint
%description devel
Development library files for ttfautohint.
%prep
%autosetup -p1
%build
%configure --disable-silent-rules --disable-static
%make_build
%install
%make_install
%delete_la
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc AUTHORS NEWS README THANKS TODO *.TXT
%doc doc/img doc/ttfautohint.{html,pdf,txt}
%license COPYING
%{_bindir}/ttfautohint
%{_bindir}/ttfautohintGUI
%{_libdir}/libttfautohint.so.1*
%files devel
%license COPYING
%{_includedir}/ttfautohint*.h
%{_libdir}/libttfautohint.so
%{_libdir}/pkgconfig/ttfautohint.pc
%changelog
* Thu Feb 27 2020 lihao <lihao129@huawei.com> - 1.8.2-2
- Package Init