Update to 0.9.18

This commit is contained in:
Kalev Lember 2013-06-09 13:19:52 +02:00
parent 22c6509f6c
commit 05ff2e65f1
5 changed files with 14 additions and 103 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/harfbuzz-0.9.9.tar.bz2
/harfbuzz-0.9.14.tar.bz2
/harfbuzz-0.9.16.tar.bz2
/harfbuzz-0.9.18.tar.bz2

View File

@ -1,81 +0,0 @@
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 2f01c28..93bce52 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -240,6 +240,11 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
hb_face_t *face = font->face;
hb_uniscribe_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face);
hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
+ SIOT siot;
+ SSOT ssot;
+ SPOT spot;
+ HINSTANCE hinstLib = LoadLibrary("usp10.dll");
+
#define FAIL(...) \
HB_STMT_START { \
@@ -249,6 +254,21 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
HRESULT hr;
+ if (hinstLib == NULL)
+ FAIL ("LoadLibrary(\"usp10.dll\") failed:", NULL);
+
+ siot = (SIOT)GetProcAddress(hinstLib, "ScriptItemizeOpenType");
+ if (siot == NULL)
+ FAIL ("GetProcAddress(\"ScriptItemizeOpenType\") failed:", NULL);
+
+ ssot = (SSOT)GetProcAddress(hinstLib, "ScriptShapeOpenType");
+ if (ssot == NULL)
+ FAIL ("GetProcAddress(\"ScriptShapeOpenType\") failed:", NULL);
+
+ spot = (SPOT)GetProcAddress(hinstLib, "ScriptPlaceOpenType");
+ if (ssot == NULL)
+ FAIL ("GetProcAddress(\"ScriptPlaceOpenType\") failed:", NULL);
+
retry:
unsigned int scratch_size;
@@ -312,7 +332,7 @@ retry:
bidi_state.uBidiLevel = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1;
bidi_state.fOverrideDirection = 1;
- hr = ScriptItemizeOpenType (wchars,
+ hr = siot (wchars,
chars_len,
MAX_ITEMS,
&bidi_control,
@@ -344,7 +364,7 @@ retry:
unsigned int item_chars_len = items[i + 1].iCharPos - chars_offset;
retry_shape:
- hr = ScriptShapeOpenType (font_data->hdc,
+ hr = ssot (font_data->hdc,
&font_data->script_cache,
&items[i].a,
script_tags[i],
@@ -386,7 +406,7 @@ retry:
for (unsigned int j = chars_offset; j < chars_offset + item_chars_len; j++)
log_clusters[j] += glyphs_offset;
- hr = ScriptPlaceOpenType (font_data->hdc,
+ hr = spot (font_data->hdc,
&font_data->script_cache,
&items[i].a,
script_tags[i],
diff --git a/src/hb-uniscribe.h b/src/hb-uniscribe.h
index 51887c8..b7e55e2 100644
--- a/src/hb-uniscribe.h
+++ b/src/hb-uniscribe.h
@@ -33,6 +33,11 @@
#define _WIN32_WINNT 0x0600
#endif
#include <windows.h>
+#include <usp10.h>
+
+typedef HRESULT WINAPI (*SIOT)(const WCHAR*,int,int,const SCRIPT_CONTROL*,const SCRIPT_STATE*,SCRIPT_ITEM*,OPENTYPE_TAG*,int*);
+typedef HRESULT WINAPI (*SSOT)(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,int,int,WORD*,SCRIPT_CHARPROP*,WORD*,SCRIPT_GLYPHPROP*,int*);
+typedef HRESULT WINAPI (*SPOT)(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,const WORD*,const SCRIPT_CHARPROP*,int,const WORD*,const SCRIPT_GLYPHPROP*,int,int*,GOFFSET*,ABC*);
HB_BEGIN_DECLS

View File

@ -1,11 +0,0 @@
--- harfbuzz-0.9.9/src/hb-uniscribe.h.orig 2012-12-24 14:28:27.539246473 +0100
+++ harfbuzz-0.9.9/src/hb-uniscribe.h 2012-12-24 14:28:49.002338096 +0100
@@ -29,7 +29,7 @@
#include "hb.h"
-#ifndef _WIN32_WINNT
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
#define _WIN32_WINNT 0x0600
#endif
#include <windows.h>

View File

@ -1,7 +1,7 @@
%{?mingw_package_header}
Name: mingw-harfbuzz
Version: 0.9.16
Version: 0.9.18
Release: 1%{?dist}
Summary: MinGW Windows Harfbuzz library
@ -26,13 +26,6 @@ BuildRequires: mingw64-freetype
BuildRequires: mingw64-cairo
BuildRequires: mingw64-icu
# https://bugs.freedesktop.org/show_bug.cgi?id=55494
Patch0: GetProcAddress_Script_OpenType.diff
# Fix build failure in harfbuzz 0.9.9. Is related to the bug above
Patch1: harfbuzz-0.9.9-fix-build-failure.patch
%description
HarfBuzz is an implementation of the OpenType Layout engine.
@ -73,8 +66,6 @@ Static version of the MinGW Windows Harfbuzz library.
%prep
%setup -q -n harfbuzz-%{version}
%patch0 -p1
%patch1 -p1
%build
@ -96,12 +87,16 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%{mingw32_bindir}/hb-shape.exe
%{mingw32_bindir}/hb-view.exe
%{mingw32_bindir}/libharfbuzz-0.dll
%{mingw32_bindir}/libharfbuzz-icu-0.dll
%{mingw32_includedir}/harfbuzz/
%{mingw32_libdir}/libharfbuzz.dll.a
%{mingw32_libdir}/libharfbuzz-icu.dll.a
%{mingw32_libdir}/pkgconfig/harfbuzz.pc
%{mingw32_libdir}/pkgconfig/harfbuzz-icu.pc
%files -n mingw32-harfbuzz-static
%{mingw32_libdir}/libharfbuzz.a
%{mingw32_libdir}/libharfbuzz-icu.a
# Win64
%files -n mingw64-harfbuzz
@ -110,15 +105,22 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%{mingw64_bindir}/hb-shape.exe
%{mingw64_bindir}/hb-view.exe
%{mingw64_bindir}/libharfbuzz-0.dll
%{mingw64_bindir}/libharfbuzz-icu-0.dll
%{mingw64_includedir}/harfbuzz/
%{mingw64_libdir}/libharfbuzz.dll.a
%{mingw64_libdir}/libharfbuzz-icu.dll.a
%{mingw64_libdir}/pkgconfig/harfbuzz.pc
%{mingw64_libdir}/pkgconfig/harfbuzz-icu.pc
%files -n mingw64-harfbuzz-static
%{mingw64_libdir}/libharfbuzz.a
%{mingw64_libdir}/libharfbuzz-icu.a
%changelog
* Sun Jun 09 2013 Kalev Lember <kalevlember@gmail.com> - 0.9.18-1
- Update to 0.9.18
* Thu May 9 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.9.16-1
- Update to 0.9.16

View File

@ -1 +1 @@
90855e670c790c1fec4592908be3c0b8 harfbuzz-0.9.16.tar.bz2
0bff05fafef4894031b2b64a65ac1899 harfbuzz-0.9.18.tar.bz2