Re: [HarfBuzz] harfbuzz: Changes to 'refs/tags/1.7.6'

2018-03-07 Thread Parag Nemade
Hi,

On Wed, Mar 7, 2018 at 8:41 PM, Behdad Esfahbod
 wrote:
> Tag '1.7.6' created by Behdad Esfahbod  at 2018-03-07 
> 15:05 +
>
> 1.7.6
> -BEGIN PGP SIGNATURE-
>
> iHAEABECADAWIQQid2UKTovf5Lf2vkGf7gTl01MRFQUCWp//thIcYmVoZGFkQGJl
> aGRhZC5vcmcACgkQn+4E5dNTERU4pwCfVwcEREG3lBSCc94zQadkS8RliK0AoKtO
> 4hmsBDvobnVQuj0HQL+mnGvO
> =tBEr
> -END PGP SIGNATURE-
>
> Changes since 1.7.5-509:
> ---
>  0 files changed
> ---

Fedora build failed with some linker error
https://koji.fedoraproject.org/koji/taskinfo?taskID=25552005

Local compilation also gave same error

Making all in test
make[2]: Entering directory '/home/testuser/rpmbuild/BUILD/harfbuzz-1.7.6/test'
Making all in api
make[3]: Entering directory
'/home/testuser/rpmbuild/BUILD/harfbuzz-1.7.6/test/api'
  CCLD test-blob
../../src/.libs/libharfbuzz.so: undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:852: test-blob] Error 1
make[3]: Leaving directory
'/home/testuser/rpmbuild/BUILD/harfbuzz-1.7.6/test/api'
make[2]: *** [Makefile:423: all-recursive] Error 1
make[2]: Leaving directory '/home/testuser/rpmbuild/BUILD/harfbuzz-1.7.6/test'

Regards,
Parag.
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: [HarfBuzz] Why harfbuzz isn't/couldn't/shouldn't provide separate [optional] API for glyph/positioning?

2018-03-07 Thread Behdad Esfahbod
On Sun, Feb 25, 2018 at 10:46 PM, Nikolay Sivov 
wrote:

> On 2/26/2018 5:28 AM, Behdad Esfahbod wrote:
> >
> > Two things stand out:
> >
> >   - There's a lot of duplicate info going into both calls,
> >
> >   - There's also a lot data coming out of the first call just to go
> > directly into the second; namely pCharPropsand pGlyphProps.
> >
> > Those two very strongly suggest that the two calls are part of the same
> > larger operation and rather forcefully separated.
>
> One example of such larger operation is ScriptStringAnalyse(), except
> that it's pre-*OpenType() and thus does not have feature ranges support.
>
> If not to justify but to understand better this separation, does it make
> sense if the idea was to have an ability to change font size? Or toggle
> GPOS features without re-running all deal of reprocessing input text
> buffer, because resulting glyph array won't change anyway at this point.
>

Changing font size initially sounds compelling. I have had that in mind for
HarfBuzz too. But in reality, no system is going to use that. It's hard
enough to keep track of input and shaped glyphstrings already. Many systems
throw that away and reshape as needed.  It's just not worth it.


> DirectWrite call is cleaner in that sense, because of separate size
> argument GetGlyphPlacements() takes, as opposed to just current font in
> HDC (or cache).
>
> ...
>
> >
> > Separating the calls also means that some things, like which OpenType
> > feature applies to what range, needs to be recalculated. Guess that's
> > not a huge deal. The biggest problem with separating the calls in a way
> > that is useful for Wine implementing the Uniscribe API on top is that we
> > have to expose the buffer-internal bit allocations. And we don't want to
> > do that, because that is an implementation detail and changes over time.
>
> Actually I have looked again last year at using hb_buffer for
> DirectWrite in Wine, and after I didn't find any way to fill buffer with
> resulting glyphs as opposed to text, I realized that it won't be easy if
> possible at all.
>

It definitely *is* possible to split hb_shape() call into two. There's some
minor complexities, those can be resolved. But channeling the entirety of
hb_glyph_info_t through the Uniscribe / DirectWrite GlyphProps API might be
harder.  I haven't fully checked the DirectWrite API. If I split hb_shape()
and write ScriptShapeOpenType / ScriptPlaceOpenType around them, would that
be enough to get you going? Might be harder with ScriptShape / ScriptPlace
which have less slots to carry info, but then again they don't have
OpenType features, so less data needs to be channeled through as well.  It
might be doable after all.


> P.S. Behdad, how do you test things? Do you have large set of texts +
> fonts you run against, more than what's in /test of hb tree I mean.
> Since hb-shape can also use Uniscribe or DirectWrite, that would be
> helpful to have such data to test Wine on.
>

Check out my writeup and talk:
https://goo.gl/9eWCLy
https://www.youtube.com/watch?v=sMkO4gF4-3U

The input data is at:
https://github.com/harfbuzz/harfbuzz-testing-wikipedia

I have a few local scripts that run this and diff against pre-recorded
output of Uniscribe, for a set of fonts. Mine is just default MS font for
each Indic scripts. That's what the numbers we put in the commits are about:

BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366355 out of 366457 tests passed. 102 failed (0.0278341%)
GURMUKHI: 60729 out of 60747 tests passed. 18 failed (0.0296311%)
KANNADA: 951300 out of 951913 tests passed. 613 failed (0.0643966%)
KHMER: 299071 out of 299124 tests passed. 53 failed (0.0177184%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)

I should make it possible for others to reproduce these.

Jonathan Kew also has had built a portal running on Amazon AWS, comparing
Uniscribe and HarfBuzz outputs on the fly and generating browsable
dashboard of the diffs. It wasn't fully productionized. It's worth picking
up again.

The main problem is that the output generated from these test suites is
massive. Just storing it is takes a lot of resources. So it's most feasible
to run the two backends side-by-side and only print out the diffs.

-- 
behdad
http://behdad.org/
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] harfbuzz: Branch 'master'

2018-03-07 Thread Behdad Esfahbod
 src/Makefile.sources   |1 
 src/hb-ot-base.h   |   56 -
 src/hb-ot-layout-base-table.hh |1 
 src/hb-ot-layout.h |   16 +++
 src/hb-ot.h|1 
 5 files changed, 16 insertions(+), 59 deletions(-)

New commits:
commit 790a11700773dd664e4d5edac63c404c5ebce080
Author: Behdad Esfahbod 
Date:   Wed Mar 7 15:31:15 2018 +0100

[ot] Remove hb-ot-base.h

BASE table API will go into hb-ot-layout.h.

diff --git a/src/Makefile.sources b/src/Makefile.sources
index 5428c6b1..072c5532 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -156,7 +156,6 @@ HB_OT_headers = \
hb-ot-font.h \
hb-ot-layout.h \
hb-ot-math.h \
-   hb-ot-base.h \
hb-ot-shape.h \
hb-ot-tag.h \
hb-ot-var.h \
diff --git a/src/hb-ot-base.h b/src/hb-ot-base.h
deleted file mode 100644
index 0437c168..
--- a/src/hb-ot-base.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright © 2017 Elie Roux
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- */
-
-#ifndef HB_OT_H_IN
-#error "Include  instead."
-#endif
-
-#ifndef HB_OT_BASE_H
-#define HB_OT_BASE_H
-
-#include "hb.h"
-
-HB_BEGIN_DECLS
-
-#define HB_OT_TAG_BASE  HB_TAG('B','A','S','E')
-
-// https://www.microsoft.com/typography/otspec/baselinetags.htm
-
-#define HB_OT_TAG_BASE_HANG HB_TAG('h','a','n','g')
-#define HB_OT_TAG_BASE_ICFB HB_TAG('i','c','f','b')
-#define HB_OT_TAG_BASE_ICFT HB_TAG('i','c','f','t')
-#define HB_OT_TAG_BASE_IDEO HB_TAG('i','d','e','o')
-#define HB_OT_TAG_BASE_IDTB HB_TAG('i','d','t','b')
-#define HB_OT_TAG_BASE_MATH HB_TAG('m','a','t','h')
-#define HB_OT_TAG_BASE_ROMN HB_TAG('r','o','m','n')
-
-/* Methods */
-
-// HB_EXTERN hb_bool_t
-// hb_ot_base_has_data (hb_face_t *face);
-
-HB_END_DECLS
-
-#endif /* HB_OT_BASE_H */
diff --git a/src/hb-ot-layout-base-table.hh b/src/hb-ot-layout-base-table.hh
index 811ef402..20b8bd76 100644
--- a/src/hb-ot-layout-base-table.hh
+++ b/src/hb-ot-layout-base-table.hh
@@ -30,7 +30,6 @@
 
 #include "hb-open-type-private.hh"
 #include "hb-ot-layout-common-private.hh"
-#include "hb-ot-base.h"
 
 namespace OT {
 
diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h
index 077644c5..85938ba1 100644
--- a/src/hb-ot-layout.h
+++ b/src/hb-ot-layout.h
@@ -317,6 +317,22 @@ hb_ot_layout_get_size_params (hb_face_t*face,
  unsigned int *range_end  /* OUT.  May be 
NULL */);
 
 
+/*
+ * BASE
+ */
+#if 0
+
+#define HB_OT_TAG_BASE_HANG HB_TAG('h','a','n','g')
+#define HB_OT_TAG_BASE_ICFB HB_TAG('i','c','f','b')
+#define HB_OT_TAG_BASE_ICFT HB_TAG('i','c','f','t')
+#define HB_OT_TAG_BASE_IDEO HB_TAG('i','d','e','o')
+#define HB_OT_TAG_BASE_IDTB HB_TAG('i','d','t','b')
+#define HB_OT_TAG_BASE_MATH HB_TAG('m','a','t','h')
+#define HB_OT_TAG_BASE_ROMN HB_TAG('r','o','m','n')
+
+#endif
+
+
 HB_END_DECLS
 
 #endif /* HB_OT_LAYOUT_H */
diff --git a/src/hb-ot.h b/src/hb-ot.h
index d1979b81..8c88784a 100644
--- a/src/hb-ot.h
+++ b/src/hb-ot.h
@@ -34,7 +34,6 @@
 #include "hb-ot-font.h"
 #include "hb-ot-layout.h"
 #include "hb-ot-math.h"
-#include "hb-ot-base.h"
 #include "hb-ot-tag.h"
 #include "hb-ot-shape.h"
 #include "hb-ot-var.h"
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

2018-03-07 Thread Behdad Esfahbod
 src/Makefile.sources  |1 
 src/hb-ot-color-cpal-table.hh |   48 
 src/hb-ot-color.h |   81 --
 src/hb-ot-shape.cc|2 -
 src/hb-ot.h   |1 
 5 files changed, 49 insertions(+), 84 deletions(-)

New commits:
commit ac2ece3e153167224c85cc384e2826ea9711a8b5
Author: Behdad Esfahbod 
Date:   Wed Mar 7 15:52:42 2018 +0100

[ot] Comment out AAT include

diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index d2d8012d..263d65c0 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -41,7 +41,7 @@
 #include "hb-set-private.hh"
 
 #include "hb-ot-layout-gsubgpos-private.hh"
-#include "hb-aat-layout-private.hh"
+//#include "hb-aat-layout-private.hh"
 
 static hb_tag_t common_features[] = {
   HB_TAG('c','c','m','p'),
commit 23a9ac993862b4a9032d38e80491a769b7ee86da
Author: Behdad Esfahbod 
Date:   Wed Mar 7 15:51:42 2018 +0100

Remove hb-ot-color.h

So I can make a release.

diff --git a/src/Makefile.sources b/src/Makefile.sources
index 072c5532..787c3c4b 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -152,7 +152,6 @@ HB_OT_RAGEL_sources = \
 
 HB_OT_headers = \
hb-ot.h \
-   hb-ot-color.h \
hb-ot-font.h \
hb-ot-layout.h \
hb-ot-math.h \
diff --git a/src/hb-ot-color-cpal-table.hh b/src/hb-ot-color-cpal-table.hh
index d2741879..e364c8a4 100644
--- a/src/hb-ot-color-cpal-table.hh
+++ b/src/hb-ot-color-cpal-table.hh
@@ -30,6 +30,54 @@
 
 #include "hb-open-type-private.hh"
 
+
+/*
+ * Following parts to be moved to a public header.
+ */
+
+/**
+ * hb_ot_color_t:
+ * ARGB data type for holding color values.
+ *
+ * Since: REPLACEME
+ */
+typedef uint32_t hb_ot_color_t;
+
+
+/**
+ * hb_ot_color_palette_flags_t:
+ * @HB_OT_COLOR_PALETTE_FLAG_DEFAULT: default indicating that there is nothing 
special to note about a color palette.
+ * @HB_OT_COLOR_PALETTE_FLAG_FOR_LIGHT_BACKGROUND: flag indicating that the 
color palette is suitable for rendering text on light background.
+ * @HB_OT_COLOR_PALETTE_FLAG_FOR_DARK_BACKGROUND: flag indicating that the 
color palette is suitable for rendering text on dark background.
+ *
+ * Since: REPLACEME
+ */
+typedef enum { /*< flags >*/
+  HB_OT_COLOR_PALETTE_FLAG_DEFAULT = 0xu,
+  HB_OT_COLOR_PALETTE_FLAG_FOR_LIGHT_BACKGROUND = 0x0001u,
+  HB_OT_COLOR_PALETTE_FLAG_FOR_DARK_BACKGROUND = 0x0002u,
+} hb_ot_color_palette_flags_t;
+
+// HB_EXTERN unsigned int
+// hb_ot_color_get_palette_count (hb_face_t *face);
+
+// HB_EXTERN unsigned int
+// hb_ot_color_get_palette_name_id (hb_face_t *face, unsigned int palette);
+
+// HB_EXTERN hb_ot_color_palette_flags_t
+// hb_ot_color_get_palette_flags (hb_face_t *face, unsigned int palette);
+
+// HB_EXTERN unsigned int
+// hb_ot_color_get_palette_colors (hb_face_t   *face,
+// unsigned int palette, /* default=0 */
+// unsigned int start_offset,
+// unsigned int*color_count /* IN/OUT */,
+// hb_ot_color_t   *colors /* OUT */);
+
+
+
+
+
 /*
  * Color Palette
  * http://www.microsoft.com/typography/otspec/cpal.htm
diff --git a/src/hb-ot-color.h b/src/hb-ot-color.h
deleted file mode 100644
index 44b3406e..
--- a/src/hb-ot-color.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright © 2016  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Sascha Brawer
- */
-
-#ifndef HB_OT_H_IN
-#error "Include  instead."
-#endif
-
-#ifndef HB_OT_COLOR_H
-#define HB_OT_COLOR_H
-
-#include "hb.h"
-
-#include "hb-ot-tag.h"
-
-HB_BEGIN_DECLS
-
-/**
- * hb_ot_color_t:
- * ARGB data type for holding color values.
- *
- * Since: REPLACEME
- */
-typedef uint32_t hb_ot_color_t;
-
-
-/**
- * hb_ot_color_palette_flags_t:
- * @HB_OT_COLOR_PALETTE_FLAG_DEFAULT: default indicating that there is 

[HarfBuzz] harfbuzz: Changes to 'refs/tags/1.7.6'

2018-03-07 Thread Behdad Esfahbod
Tag '1.7.6' created by Behdad Esfahbod  at 2018-03-07 15:05 
+

1.7.6
-BEGIN PGP SIGNATURE-

iHAEABECADAWIQQid2UKTovf5Lf2vkGf7gTl01MRFQUCWp//thIcYmVoZGFkQGJl
aGRhZC5vcmcACgkQn+4E5dNTERU4pwCfVwcEREG3lBSCc94zQadkS8RliK0AoKtO
4hmsBDvobnVQuj0HQL+mnGvO
=tBEr
-END PGP SIGNATURE-

Changes since 1.7.5-509:
---
 0 files changed
---
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] harfbuzz: Branch 'master'

2018-03-07 Thread Behdad Esfahbod
 NEWS |   15 +++
 configure.ac |2 +-
 src/hb-version.h |4 ++--
 3 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit ff2f81432bb0484a019a678058595e10217df51d
Author: Behdad Esfahbod 
Date:   Wed Mar 7 16:05:14 2018 +0100

1.7.6

diff --git a/NEWS b/NEWS
index 9015c4ad..fe09ab16 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+Overview of changes leading to 1.7.6
+Wednesday, March 7, 2018
+
+
+- Fix to hb_set_t binary operations. Ouch.
+- New experimental harfbuzz-subset library. All of hb-subset.h
+  is experimental right now and API WILL change.
+
+- New API:
+hb_blob_copy_writable_or_fail()
+HB_OT_TAG_BASE
+hb_set_previous()
+hb_set_previous_range()
+
+
 Overview of changes leading to 1.7.5
 Tuesday, January 30, 2018
 
diff --git a/configure.ac b/configure.ac
index 694e86bb..1fb8a10a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-[1.7.5],
+[1.7.6],
 [https://github.com/harfbuzz/harfbuzz/issues/new],
 [harfbuzz],
 [http://harfbuzz.org/])
diff --git a/src/hb-version.h b/src/hb-version.h
index f0f5a181..27509326 100644
--- a/src/hb-version.h
+++ b/src/hb-version.h
@@ -38,9 +38,9 @@ HB_BEGIN_DECLS
 
 #define HB_VERSION_MAJOR 1
 #define HB_VERSION_MINOR 7
-#define HB_VERSION_MICRO 5
+#define HB_VERSION_MICRO 6
 
-#define HB_VERSION_STRING "1.7.5"
+#define HB_VERSION_STRING "1.7.6"
 
 #define HB_VERSION_ATLEAST(major,minor,micro) \
((major)*1+(minor)*100+(micro) <= \
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] harfbuzz: Branch 'master'

2018-03-07 Thread Behdad Esfahbod
 test/api/hb-subset-test.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70ad69f2449d754fcc5270ff3ca3848a77f4c7af
Author: Behdad Esfahbod 
Date:   Wed Mar 7 16:11:44 2018 +0100

[test] Fix build with older glib

diff --git a/test/api/hb-subset-test.h b/test/api/hb-subset-test.h
index 8e579a6c..f8386b16 100644
--- a/test/api/hb-subset-test.h
+++ b/test/api/hb-subset-test.h
@@ -75,7 +75,7 @@ hb_subset_test_open_font (const char *font_path)
 #if GLIB_CHECK_VERSION(2,37,2)
   gchar* path = g_test_build_filename(G_TEST_DIST, font_path, NULL);
 #else
-  gchar* path = g_strdup(fontFile);
+  gchar* path = g_strdup(font_path);
 #endif
 
   size_t length;
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz