[HarfBuzz] [kakuto at fuk.kindai.ac.jp: new XeTeX]
Khaled Hosny
khaledhosny at eglug.org
Thu Jan 3 21:39:00 PST 2013
Hi Akira,
Thanks for the patches, I'm forwarding the HarfBuzz one to its mailing
list.
Regards,
Khaled
----- Forwarded message from Akira Kakuto <kakuto at fuk.kindai.ac.jp> -----
From: Akira Kakuto <kakuto at fuk.kindai.ac.jp>
To: khaledhosny at eglug.org
Cc: Peter Breitenlohner <peb at mppmu.mpg.de>
Subject: new XeTeX
Dear Khaled Hosny,
Thanks for the new XeTeX.
I atach changes for Visual Studio 2005:
harfbuzz.diff.txt for harfbuzz-0.9.10
xetex.diff.txt for XeTeX.
I think it compiles and runs fine.
Thanks,
Akira
----- End forwarded message -----
-------------- next part --------------
diff -ur harfbuzz-0.9.10-orig/src/hb-open-type-private.hh harfbuzz-0.9.10/src/hb-open-type-private.hh
--- harfbuzz-0.9.10-orig/src/hb-open-type-private.hh Thu Jan 03 18:48:38 2013
+++ harfbuzz-0.9.10/src/hb-open-type-private.hh Fri Jan 04 09:05:09 2013
@@ -946,11 +946,25 @@
return i;
return -1;
} else {
+#if !defined (_MSC_VER)
struct Cmp {
static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
};
const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
return p ? p - this->array : -1;
+#elif defined (HB_OT_LAYOUT_CC)
+ struct Cmp {
+ static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
+ };
+ const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
+ return p ? p - this->array : -1;
+#else
+ struct Cmp2 {
+ static int cmp2 (const SearchType *a, const Type *b) { return b->cmp (*a); }
+ };
+ const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp2::cmp2);
+ return p ? p - this->array : -1;
+#endif /* !_MSC_VER */
}
}
};
diff -ur harfbuzz-0.9.10-orig/src/hb-ot-layout-gsubgpos-private.hh harfbuzz-0.9.10/src/hb-ot-layout-gsubgpos-private.hh
--- harfbuzz-0.9.10-orig/src/hb-ot-layout-gsubgpos-private.hh Thu Jan 03 18:48:38 2013
+++ harfbuzz-0.9.10/src/hb-ot-layout-gsubgpos-private.hh Thu Jan 03 17:02:28 2013
@@ -62,7 +62,11 @@
template <typename T>
inline return_t process (const T &obj) { obj.closure (this); return HB_VOID; }
static return_t default_return_value (void) { return HB_VOID; }
+#ifdef _MSC_VER
+ bool stop_sublookup_iteration (return_t r HB_UNUSED) const { return false; }
+#else
bool stop_sublookup_iteration (const return_t r HB_UNUSED) const { return false; }
+#endif
return_t recurse (unsigned int lookup_index)
{
if (unlikely (nesting_level_left == 0 || !recurse_func))
@@ -150,7 +154,11 @@
template <typename T>
inline return_t process (const T &obj) { obj.collect_glyphs (this); return HB_VOID; }
static return_t default_return_value (void) { return HB_VOID; }
+#ifdef _MSC_VER
+ bool stop_sublookup_iteration (return_t r HB_UNUSED) const { return false; }
+#else
bool stop_sublookup_iteration (const return_t r HB_UNUSED) const { return false; }
+#endif
return_t recurse (unsigned int lookup_index)
{
if (unlikely (nesting_level_left == 0 || !recurse_func))
diff -ur harfbuzz-0.9.10-orig/src/hb-ot-layout.cc harfbuzz-0.9.10/src/hb-ot-layout.cc
--- harfbuzz-0.9.10-orig/src/hb-ot-layout.cc Thu Jan 03 18:48:38 2013
+++ harfbuzz-0.9.10/src/hb-ot-layout.cc Fri Jan 04 09:05:39 2013
@@ -27,6 +27,9 @@
* Red Hat Author(s): Behdad Esfahbod
* Google Author(s): Behdad Esfahbod
*/
+#ifdef _MSC_VER
+#define HB_OT_LAYOUT_CC
+#endif
#include "hb-ot-layout-private.hh"
More information about the HarfBuzz
mailing list