Jonathan Kew | 31 Mar 23:12 2015
Picon

Using snprintf under MSVC

Hi Behdad,

When compiling with MSVC, we have "#define snprintf _snprintf" in 
hb-private.hh. However, it seems that MSVC 2015 now provides snprintf 
itself, so I think we should use that directly instead, and make the 
#define conditional on the value of _MSC_VER.

(See patch 9 in https://bugzilla.mozilla.org/show_bug.cgi?id=1119776.)

Thanks,

JK

_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Konstantin Ritt | 28 Mar 20:28 2015
Picon

To HB_NO_MT or not to HB_NO_MT

Hi list,

Intro: the configure script tries to detect the Intel and Solaris atomic primitives/ops support and if that failed, HB falls back to the thread-unsafe default implementation and warns the user (and also proposes to suppress the warning by defining HB_NO_MT ;) ). Moreover, HB_NO_MT is the only alternative suggested by Android.mk (though docs/ANDROID-ATOMICS.htm says the atomics are supported)!

Issue: in a multi-threaded application, there is no possibility to check if HB library we're linking to is thread-safe -> we blindly assume it is.

Proposed solution: in case the configure script failed to detect the supported atomic primitives, proceed with a warning and expect the build to fail if the user didn't provide his own implementation (ie. in config.h or via some external include). This way, we could even get rid of HB_NO_MT path -- where explicitly required, the user would be able to provide his no-MT implementation (ie. for HB built in a single-threaded application).

WDYT?

Regards,
Konstantin
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 26 Mar 19:14 2015

harfbuzz: Branch 'master'

 src/hb-buffer-deserialize-text.rl |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit aee685086c8fde6f6c4590e483a177c19f222540
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Thu Mar 26 14:13:53 2015 -0400

    Fix VC++ /analyze warnings

    out\debug\hb-buffer-deserialize-text.rl(47) : warning C6001: Using
    uninitialized memory 'pos'.

diff --git a/src/hb-buffer-deserialize-text.rl b/src/hb-buffer-deserialize-text.rl
index 8856580..8a682f7 100644
--- a/src/hb-buffer-deserialize-text.rl
+++ b/src/hb-buffer-deserialize-text.rl
 <at>  <at>  -111,8 +111,8  <at>  <at>  _hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer,

   const char *eof = pe, *tok = NULL;
   int cs;
-  hb_glyph_info_t info;
-  hb_glyph_position_t pos;
+  hb_glyph_info_t info = {0};
+  hb_glyph_position_t pos = {0};
   %%{
     write init;
     write exec;
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Martin Hosken | 25 Mar 10:59 2015
Picon

towards an OT debugger

Dear Behdad,

Thanks for your help in getting the debug output from hb. I've been playing and have some thoughts about how
to use the existing debug framework to help with font development.

1. It would be great if the HB_DEBUG variable controlled which categories of debug are output, rather than
the depth. For example, I don't need the SANITIZE debug (and pretty much anything else than APPLY).

2. It would be good if we can get the lookup index, somehow, into the debug report. I don't think it's stored in
the lookup. But I may be wrong.

3. Is there a way to print out the whole buffer as per, perhaps, the output from hb-shape. And can we call that
from when a lookup starts.

These would be the basics. I'm sort of thinking about creeping up on the problem rather than building some
massive implementation layer either to the side or inside. If we can get the debug system to print at least
the info we need, we can have it call a side library to do the debug reporting later on.

TIA,
Yours,
Martin
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Martin Hosken | 23 Mar 07:10 2015
Picon

is opentype crazy

Dear All,

It seems that if I want to insert a glyph (say a dotted circle) between two diacritics, then I can. I can

sub diac1' diac2 by diac1 dottedcircle

or something akin to that. But when I do, because diac1 is a mark and not a ligature, harfbuzz resets the
advance of my dottedcircle to 0, even though dottedcircle is listed in gdef as being a base. Is this a bug, he
asks hopefully?

GB,
Martin
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 22 Mar 21:56 2015

harfbuzz: Branch 'master' - 2 commits

 src/hb-common.cc |    8 ++++----
 src/hb-font.cc   |    2 +-
 src/hb-shape.cc  |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 8886ab430ca68539cb318e175647e9f6973718b0
Merge: e3671b8 a394bb6
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Sun Mar 22 16:18:57 2015 -0400

    Merge pull request #90 from khaledhosny/introspection-fixes

    [bindings] Fix *_from_string functions

commit a394bb66707184c995fe2d08c80e98220e6ec0b0
Author: Khaled Hosny <khaledhosny <at> eglug.org>
Date:   Sun Mar 22 20:29:10 2015 +0200

    [bindings] Fix *_from_string functions

    Without the element-type they will be getting garbage, at least with
    Python.

diff --git a/src/hb-common.cc b/src/hb-common.cc
index 05a1f9c..1516211 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
 <at>  <at>  -57,7 +57,7  <at>  <at>  _hb_options_init (void)

 /**
  * hb_tag_from_string:
- *  <at> str: (array length=len): 
+ *  <at> str: (array length=len) (element-type uint8_t): 
  *  <at> len: 
  *
  * 
 <at>  <at>  -115,7 +115,7  <at>  <at>  const char direction_strings[][4] = {

 /**
  * hb_direction_from_string:
- *  <at> str: (array length=len): 
+ *  <at> str: (array length=len) (element-type uint8_t): 
  *  <at> len: 
  *
  * 
 <at>  <at>  -281,7 +281,7  <at>  <at>  retry:

 /**
  * hb_language_from_string:
- *  <at> str: (array length=len): 
+ *  <at> str: (array length=len) (element-type uint8_t): 
  *  <at> len: 
  *
  * 
 <at>  <at>  -401,7 +401,7  <at>  <at>  hb_script_from_iso15924_tag (hb_tag_t tag)

 /**
  * hb_script_from_string:
- *  <at> s: (array length=len): 
+ *  <at> s: (array length=len) (element-type uint8_t): 
  *  <at> len: 
  *
  * 
diff --git a/src/hb-font.cc b/src/hb-font.cc
index 4364ca7..d42db59 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
 <at>  <at>  -814,7 +814,7  <at>  <at>  hb_font_glyph_to_string (hb_font_t *font,
 /**
  * hb_font_glyph_from_string:
  *  <at> font: a font.
- *  <at> s: (array length=len): 
+ *  <at> s: (array length=len) (element-type uint8_t): 
  *  <at> len: 
  *  <at> glyph: (out): 
  *
diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 9a59c08..4e22c61 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -198,7 +198,7  <at>  <at>  parse_one_feature (const char **pp, const char *end, hb_feature_t *feature)

 /**
  * hb_feature_from_string:
- *  <at> str: (array length=len):
+ *  <at> str: (array length=len) (element-type uint8_t):
  *  <at> len: 
  *  <at> feature: (out) (optional):
  *
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 20 Mar 23:05 2015

harfbuzz: Branch 'master'

 NEWS         |    8 ++++++++
 configure.ac |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit e3671b8f8bb339e8a563a9da9cd5069073200fec
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Mar 20 18:03:02 2015 -0400

    0.9.40

diff --git a/NEWS b/NEWS
index dbbfbba..c4950e2 100644
--- a/NEWS
+++ b/NEWS
 <at>  <at>  -1,3 +1,11  <at>  <at> 
+Overview of changes leading to 0.9.40
+Friday, March 20, 2015
+=====================================
+
+- Another hb-coretext crasher fix.  Ouch!
+- Happy Norouz!
+
+
 Overview of changes leading to 0.9.39
 Wednesday, March 4, 2015
 =====================================
diff --git a/configure.ac b/configure.ac
index 166a121..5baad1f 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -1,6 +1,6  <at>  <at> 
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [0.9.39],
+        [0.9.40],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
         [harfbuzz],
         [http://harfbuzz.org/])
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 20 Mar 23:05 2015

harfbuzz: Changes to 'refs/tags/0.9.40'

Tag '0.9.40' created by Behdad Esfahbod <behdad <at> behdad.org> at 2015-03-20 23:03 -0700

0.9.40
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEABECAAYFAlUMmR4ACgkQn+4E5dNTERX8HQCeMdYGUAfRHVqEJkFnQQP2CgJP
QLoAoKr2LI/4A+AdrEDoaUpNS2BphXEn
=yuAx
-----END PGP SIGNATURE-----

Changes since 0.9.39-3:
---
 0 files changed
---
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 20 Mar 21:09 2015

harfbuzz: Branch 'master'

 src/hb-buffer.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9e401f6890f2bea1d11914bca436c2230f8d0f1b
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Mar 20 16:08:38 2015 -0400

    Fix reverse_range() for empty range

    Fixes coretext notdef loop consisting of all default_ignorable glyphs

    https://code.google.com/p/chromium/issues/detail?id=464755

diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index 942177c..b9fe263 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
 <at>  <at>  -443,7 +443,7  <at>  <at>  hb_buffer_t::reverse_range (unsigned int start,
 {
   unsigned int i, j;

-  if (start == end - 1)
+  if (end - start < 2)
     return;

   for (i = start, j = end - 1; i < j; i++, j--) {
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Adam Twardoch (List | 18 Mar 01:27 2015

HB coretext_aat shaper?

Behdad, 

What functionality does the coretext_aat shaper currently support? I can see that it does something with
"mort" and "morx", but possibly not "kerx" or the extended "kern" table? Or does it? With something like
hb-view, which options (if any) are passed on? Direction, script, language, features? 

Thanks,
A.
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Martin Hosken | 16 Mar 17:02 2015
Picon

using HB_DEBUG

Dear Behdad,

How does one use HB_DEBUG? Are there magic values? Is there a configure option? How do you typically turn on HB_DEBUG?

TIA,
Yours,
Martin
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz

Gmane