Steven R. Loomis | 31 Jul 07:54 2014

FYI: JDK harfbuzz integration

Dear harfbuzz users and friends,
 
 The JDK integration project is now live!

 This project will integrate harfbuzz as the layout engine used in the JDK replacing the deprecated ICU layout engine. 

For a few more details and to sign up to the mailing list please see: http://openjdk.java.net/projects/harfbuzz/

Thank you!


Enviado desde nuestro iPhone.
<div>
<div>Dear harfbuzz users and friends,</div>
<div>&nbsp;</div>
<div>&nbsp;The JDK integration project is now live!</div>
<div><br></div>
<div>&nbsp;This project will integrate harfbuzz as the layout engine used in the JDK replacing the deprecated ICU layout engine.&nbsp;</div>
<div><br></div>
<div>For a few more details and to sign up to the mailing list please see:&nbsp;<a href="http://openjdk.java.net/projects/harfbuzz/">http://openjdk.java.net/projects/harfbuzz/</a>
</div>
<div><br></div>
<div>Thank you!</div>
<div>
<br><br><span>Enviado desde nuestro iPhone.</span>
</div>
</div>
Travis CI | 30 Jul 18:14 2014

Errored: behdad/harfbuzz#366 (win1256 - 7500936)

behdad / harfbuzz (win1256)
Build #366 has errored.
5 minutes and 1 second
Behdad Esfahbod 7500936 Changeset →
  [arabic] Implement Windows-1256 private shaping

Bug 1045139 - The Arabic text with "MS Sans Serif" font is rendered bad
https://bugzilla.mozilla.org/show_bug.cgi?id=1045139

This is only enabled on Windows platforms, and requires support from
Uniscribe to work. But for clients that do hook up to Uniscribe, this
fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif".

The code and table together have just less than a 1kb footprint when
enabled.

UNTESTED. I might even have broken regular Arabic fallback shaping.

Would you like to test your private code?

Travis Pro could be your new best friend!

<div>
    <div>
      <table class="repository"><tr>
<td><span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=https%3A%2F%2Ftravis-ci.org%2Fbehdad%2Fharfbuzz&amp;url_id=c05b817f5e7fca9f117e0a9a59ff27498f7cc7d0">behdad / harfbuzz</a> (<a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Ftree%2Fwin1256&amp;url_id=305c3b6599d6a0254984d50ec0e2e79ce1e7f836">win1256</a>)</span></td>
        </tr></table>
<div class="error">
        <div class="content">
          <table>
<tr>
<td><div class="status-image"></div></td>
                <td class="build-message"><span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=https%3A%2F%2Ftravis-ci.org%2Fbehdad%2Fharfbuzz%2Fbuilds%2F31250470&amp;url_id=5ca76ac97d9bcaa67cb11f4e8db47cf794849a4b">Build #366 has errored.</a></span></td>
                <td align="right" class="time">
<div class="stop-watch"></div> <span>5 minutes and 1 second</span>
</td>
              </tr>
<tr>
<td class="profile-image"></td>
                <td class="grey">Behdad Esfahbod</td>
                <td align="right" class="grey">
<a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Fcommit%2F750093619aa45a9d5c77bcd144839f5f62c728c1&amp;url_id=50db29b0723faf8c570d72e3c46ff7db70831a17">7500936</a> <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Fcompare%2F479ae6855d56...750093619aa4&amp;url_id=a276aaa11947bf68165c84ad4d1cd86cf0d0c176">Changeset &rarr;</a>
</td>
              </tr>
<tr>
<td>&nbsp;</td>
                <td class="grey" colspan="2">[arabic] Implement Windows-1256 private shaping<br><br>Bug 1045139 - The Arabic text with "MS Sans Serif" font is rendered bad<br>https://bugzilla.mozilla.org/show_bug.cgi?id=1045139<br><br>This is only enabled on Windows platforms, and requires support from<br>Uniscribe to work.  But for clients that do hook up to Uniscribe, this<br>fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif".<br><br>The code and table together have just less than a 1kb footprint when<br>enabled.<br><br>UNTESTED.  I might even have broken regular Arabic fallback shaping.</td>
              </tr>
</table>
</div>
      </div>

      <table border="0" class="footer"><tr>
<td>
            </td>
          <td class="grey">
            <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=http%3A%2F%2Fdocs.travis-ci.com&amp;url_id=5fa792b8f9794a936e49fb77042472d6597ff08c">Documentation</a> about Travis CI<br>
            For help please join our IRC channel <a href="irc://irc.freenode.net/travis">irc.freenode.net#travis</a>.<br>
            Choose who receives these build notification emails in your <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=http%3A%2F%2Fdocs.travis-ci.com%2Fuser%2Fnotifications&amp;url_id=4f5c60d0dcb18d9dd3a3031db3c2751986b22ca0">configuration file</a>.
          </td>
        </tr></table>
<div>
        <div class="section footnote">
          <p class="grey">Would you like to test your private code?</p>
          <p class="grey"><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=http%3A%2F%2Ftravis-ci.com%3Futm_source%3Dbuild_email_footer%26utm_campaign%3Dtravis-ci.org%26utm_medium%3Demail&amp;url_id=2000c242919fdaf375e48a3d9938df8077c6e198">Travis Pro</a> could be your new best friend!</p>
        </div>

        <div class="tiny-footer">
          <p class="grey"> 
            <span>Travis CI is powered by </span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=72eea1eb2d544139a751ddd056113f33&amp;url=http%3A%2F%2Fbluebox.net&amp;url_id=0fe132f64bd24688e0c90360724064f644e1ec31"></a>
          </p>
        </div>
      </div>

    </div>

</div>
Travis CI | 30 Jul 18:14 2014

Errored: behdad/harfbuzz#367 (win1256 - 3bd1c87)

behdad / harfbuzz (win1256)
Build #367 has errored.
3 minutes and 13 seconds
Behdad Esfahbod 3bd1c87 Changeset →
  [arabic] Implement Windows-1256 private shaping

Bug 1045139 - The Arabic text with "MS Sans Serif" font is rendered bad
https://bugzilla.mozilla.org/show_bug.cgi?id=1045139

This is only enabled on Windows platforms, and requires support from
Uniscribe to work. But for clients that do hook up to Uniscribe, this
fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif".

The code and table together have just less than a 1kb footprint when
enabled.

UNTESTED. I might even have broken regular Arabic fallback shaping.

Would you like to test your private code?

Travis Pro could be your new best friend!

<div>
    <div>
      <table class="repository"><tr>
<td><span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=https%3A%2F%2Ftravis-ci.org%2Fbehdad%2Fharfbuzz&amp;url_id=c05b817f5e7fca9f117e0a9a59ff27498f7cc7d0">behdad / harfbuzz</a> (<a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Ftree%2Fwin1256&amp;url_id=305c3b6599d6a0254984d50ec0e2e79ce1e7f836">win1256</a>)</span></td>
        </tr></table>
<div class="error">
        <div class="content">
          <table>
<tr>
<td><div class="status-image"></div></td>
                <td class="build-message"><span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=https%3A%2F%2Ftravis-ci.org%2Fbehdad%2Fharfbuzz%2Fbuilds%2F31250616&amp;url_id=5ca76ac97d9bcaa67cb11f4e8db47cf794849a4b">Build #367 has errored.</a></span></td>
                <td align="right" class="time">
<div class="stop-watch"></div> <span>3 minutes and 13 seconds</span>
</td>
              </tr>
<tr>
<td class="profile-image"></td>
                <td class="grey">Behdad Esfahbod</td>
                <td align="right" class="grey">
<a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Fcommit%2F3bd1c87ba3ef808106a6f5c0a01e7a479cf4089b&amp;url_id=50db29b0723faf8c570d72e3c46ff7db70831a17">3bd1c87</a> <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Fcompare%2F750093619aa4...3bd1c87ba3ef&amp;url_id=a276aaa11947bf68165c84ad4d1cd86cf0d0c176">Changeset &rarr;</a>
</td>
              </tr>
<tr>
<td>&nbsp;</td>
                <td class="grey" colspan="2">[arabic] Implement Windows-1256 private shaping<br><br>Bug 1045139 - The Arabic text with "MS Sans Serif" font is rendered bad<br>https://bugzilla.mozilla.org/show_bug.cgi?id=1045139<br><br>This is only enabled on Windows platforms, and requires support from<br>Uniscribe to work.  But for clients that do hook up to Uniscribe, this<br>fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif".<br><br>The code and table together have just less than a 1kb footprint when<br>enabled.<br><br>UNTESTED.  I might even have broken regular Arabic fallback shaping.</td>
              </tr>
</table>
</div>
      </div>

      <table border="0" class="footer"><tr>
<td>
            </td>
          <td class="grey">
            <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=http%3A%2F%2Fdocs.travis-ci.com&amp;url_id=5fa792b8f9794a936e49fb77042472d6597ff08c">Documentation</a> about Travis CI<br>
            For help please join our IRC channel <a href="irc://irc.freenode.net/travis">irc.freenode.net#travis</a>.<br>
            Choose who receives these build notification emails in your <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=http%3A%2F%2Fdocs.travis-ci.com%2Fuser%2Fnotifications&amp;url_id=4f5c60d0dcb18d9dd3a3031db3c2751986b22ca0">configuration file</a>.
          </td>
        </tr></table>
<div>
        <div class="section footnote">
          <p class="grey">Would you like to test your private code?</p>
          <p class="grey"><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=http%3A%2F%2Ftravis-ci.com%3Futm_source%3Dbuild_email_footer%26utm_campaign%3Dtravis-ci.org%26utm_medium%3Demail&amp;url_id=2000c242919fdaf375e48a3d9938df8077c6e198">Travis Pro</a> could be your new best friend!</p>
        </div>

        <div class="tiny-footer">
          <p class="grey"> 
            <span>Travis CI is powered by </span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=26596f7353534357b6e47b78478f6098&amp;url=http%3A%2F%2Fbluebox.net&amp;url_id=0fe132f64bd24688e0c90360724064f644e1ec31"></a>
          </p>
        </div>
      </div>

    </div>

</div>
Travis CI | 30 Jul 08:26 2014

Passed: behdad/harfbuzz#365 (win1256 - 479ae68)

behdad / harfbuzz (win1256)
Build #365 passed.
1 minute and 37 seconds
Behdad Esfahbod 479ae68 Changeset →
  [arabic] Implement Windows-1256 private shaping

Bug 1045139 - The Arabic text with "MS Sans Serif" font is rendered bad
https://bugzilla.mozilla.org/show_bug.cgi?id=1045139

This is only enabled on Windows platforms, and requires support from
Uniscribe to work. But for clients that do hook up to Uniscribe, this
fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif".

The code and table together have just less than a 1kb footprint when
enabled.

UNTESTED. I might even have broken regular Arabic fallback shaping.

Would you like to test your private code?

Travis Pro could be your new best friend!

<div>
    <div>
      <table class="repository"><tr>
<td><span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=https%3A%2F%2Ftravis-ci.org%2Fbehdad%2Fharfbuzz&amp;url_id=c05b817f5e7fca9f117e0a9a59ff27498f7cc7d0">behdad / harfbuzz</a> (<a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Ftree%2Fwin1256&amp;url_id=305c3b6599d6a0254984d50ec0e2e79ce1e7f836">win1256</a>)</span></td>
        </tr></table>
<div class="success">
        <div class="content">
          <table>
<tr>
<td><div class="status-image"></div></td>
                <td class="build-message"><span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=https%3A%2F%2Ftravis-ci.org%2Fbehdad%2Fharfbuzz%2Fbuilds%2F31206915&amp;url_id=5ca76ac97d9bcaa67cb11f4e8db47cf794849a4b">Build #365 passed.</a></span></td>
                <td align="right" class="time">
<div class="stop-watch"></div> <span>1 minute and 37 seconds</span>
</td>
              </tr>
<tr>
<td class="profile-image"></td>
                <td class="grey">Behdad Esfahbod</td>
                <td align="right" class="grey">
<a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Fcommit%2F479ae6855d5611f9d05441b320e4db57d3502f4a&amp;url_id=50db29b0723faf8c570d72e3c46ff7db70831a17">479ae68</a> <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=https%3A%2F%2Fgithub.com%2Fbehdad%2Fharfbuzz%2Fcompare%2F88911e8cc765%5E...479ae6855d56&amp;url_id=a276aaa11947bf68165c84ad4d1cd86cf0d0c176">Changeset &rarr;</a>
</td>
              </tr>
<tr>
<td>&nbsp;</td>
                <td class="grey" colspan="2">[arabic] Implement Windows-1256 private shaping<br><br>Bug 1045139 - The Arabic text with "MS Sans Serif" font is rendered bad<br>https://bugzilla.mozilla.org/show_bug.cgi?id=1045139<br><br>This is only enabled on Windows platforms, and requires support from<br>Uniscribe to work.  But for clients that do hook up to Uniscribe, this<br>fixes shaping of Windows-1256-encoded bitmap fonts like "MS Sans Serif".<br><br>The code and table together have just less than a 1kb footprint when<br>enabled.<br><br>UNTESTED.  I might even have broken regular Arabic fallback shaping.</td>
              </tr>
</table>
</div>
      </div>

      <table border="0" class="footer"><tr>
<td>
            </td>
          <td class="grey">
            <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=http%3A%2F%2Fdocs.travis-ci.com&amp;url_id=5fa792b8f9794a936e49fb77042472d6597ff08c">Documentation</a> about Travis CI<br>
            For help please join our IRC channel <a href="irc://irc.freenode.net/travis">irc.freenode.net#travis</a>.<br>
            Choose who receives these build notification emails in your <a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=http%3A%2F%2Fdocs.travis-ci.com%2Fuser%2Fnotifications&amp;url_id=4f5c60d0dcb18d9dd3a3031db3c2751986b22ca0">configuration file</a>.
          </td>
        </tr></table>
<div>
        <div class="section footnote">
          <p class="grey">Would you like to test your private code?</p>
          <p class="grey"><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=http%3A%2F%2Ftravis-ci.com%3Futm_source%3Dbuild_email_footer%26utm_campaign%3Dtravis-ci.org%26utm_medium%3Demail&amp;url_id=2000c242919fdaf375e48a3d9938df8077c6e198">Travis Pro</a> could be your new best friend!</p>
        </div>

        <div class="tiny-footer">
          <p class="grey"> 
            <span>Travis CI is powered by </span><a href="http://clicks.travis-ci.org/track/click.php?u=30007208&amp;id=7dcf4ba06fe3414a8cd670309ceeaf32&amp;url=http%3A%2F%2Fbluebox.net&amp;url_id=0fe132f64bd24688e0c90360724064f644e1ec31"></a>
          </p>
        </div>
      </div>

    </div>

</div>
Edu García | 30 Jul 05:42 2014
Picon

Harfbuzz features and layout

Hi there,

First of all, just let me say that Harfbuzz seems like an awesome piece of engineering, and the API seems a breeze to use. I've done a very simple example in just a few hours, and I'm very happy about that :).

I have two (very noob, sorry) questions, tough:

1) I want to enable (or disable) ligatures. I've seen that when using a font like Adobe Garamond Pro, ligatures are automatically used. I thought I had to pass a feature to hb_shape() to do that? Also, is there any way of enabling only some kind of ligatures, like historical ones?
2) Is Harfbuzz the right thing to use if I want to layout my text in a particular form? For example, I want to enclose my string in a box shape (like a page), and I was expecting Harfbuzz to automatically move the words around, but maybe this is the wrong thing to use and I need something like Pango? If Harfbuzz is the right thing to use, can I have random shapes, or just rectangles?

Thank you in advance!
<div><div dir="ltr">Hi there,<div><br></div>
<div>First of all, just let me say that Harfbuzz seems like an awesome piece of engineering, and the API seems a breeze to use. I've done a very simple example in just a few hours, and I'm very happy about that :).<br><div><br></div>
<div>I have two (very noob, sorry) questions, tough:</div>
</div>
<div><br></div>
<div>1) I want to enable (or disable) ligatures. I've seen that when using a font like Adobe Garamond Pro, ligatures are automatically used. I thought I had to pass a feature to hb_shape() to do that? Also, is there any way of enabling only some kind of ligatures, like historical ones?</div>
<div>2) Is Harfbuzz the right thing to use if I want to layout my text in a particular form? For example, I want to enclose my string in a box shape (like a page), and I was expecting Harfbuzz to automatically move the words around, but maybe this is the wrong thing to use and I need something like Pango? If Harfbuzz is the right thing to use, can I have random shapes, or just rectangles?</div>
<div><br></div>
<div>Thank you in advance!</div>
</div></div>
Behdad Esfahbod | 27 Jul 02:35 2014

harfbuzz: Branch 'master'

 src/hb-ot-shape-complex-hebrew.cc                                       |    2 +-
 test/shaping/fonts/sha1sum/8454d22037f892e76614e1645d066689a0200e61.ttf |binary
 test/shaping/fonts/sha1sum/MANIFEST                                     |    1 +
 test/shaping/tests/zero-width-marks.tests                               |    1 +
 4 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9e834e29e0b657f0555df1ab9cea79ff7abcf08d
Author: Behdad Esfahbod <behdad@...>
Date:   Sat Jul 26 20:34:01 2014 -0400

    [hebrew] Zero mark advance by GDEF late

    Seems to be what Uniscribe does.

    At this point I think it's work checking our default...

    Fixes Bug 76767 - Zeroing of advance of 2nd component of multiple
    substitution with SBL Hebrew
    https://bugs.freedesktop.org/show_bug.cgi?id=76767

    Micro-test added.

diff --git a/src/hb-ot-shape-complex-hebrew.cc b/src/hb-ot-shape-complex-hebrew.cc
index 2381a6e..c7b7a5e 100644
--- a/src/hb-ot-shape-complex-hebrew.cc
+++ b/src/hb-ot-shape-complex-hebrew.cc
 <at>  <at>  -167,6 +167,6  <at>  <at>  const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
   NULL, /* decompose */
   compose_hebrew,
   NULL, /* setup_masks */
-  HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT,
+  HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
   true, /* fallback_position */
 };
diff --git a/test/shaping/fonts/sha1sum/8454d22037f892e76614e1645d066689a0200e61.ttf b/test/shaping/fonts/sha1sum/8454d22037f892e76614e1645d066689a0200e61.ttf
new file mode 100644
index 0000000..2cbb67a
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/8454d22037f892e76614e1645d066689a0200e61.ttf differ
diff --git a/test/shaping/fonts/sha1sum/MANIFEST b/test/shaping/fonts/sha1sum/MANIFEST
index 0e9da64..fe359b1 100644
--- a/test/shaping/fonts/sha1sum/MANIFEST
+++ b/test/shaping/fonts/sha1sum/MANIFEST
 <at>  <at>  -4,6 +4,7  <at>  <at> 
 4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
 57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
 813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf
+8454d22037f892e76614e1645d066689a0200e61.ttf
 8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf
 a919b33197965846f21074b24e30250d67277bce.ttf
 bb29ce50df2bdba2d10726427c6b7609bf460e04.ttf
diff --git a/test/shaping/tests/zero-width-marks.tests b/test/shaping/tests/zero-width-marks.tests
index bfe0809..be7ec96 100644
--- a/test/shaping/tests/zero-width-marks.tests
+++ b/test/shaping/tests/zero-width-marks.tests
 <at>  <at>  -1 +1,2  <at>  <at> 
 fonts/sha1sum/bb9473d2403488714043bcfb946c9f78b86ad627.ttf:U+1030:[circledash=0+636|u1030.med=0 <at> -162,0+0]
+fonts/sha1sum/8454d22037f892e76614e1645d066689a0200e61.ttf:U+05E0,U+05B8,U+0591,U+05DA,U+05B0:[uni05DA05B0=3+991|uni2009=0+200|uni0591=0 <at> 75,0+0|uni05B8=0 <at> 495,0+0|uni05E0=0+683]
Behdad Esfahbod | 27 Jul 01:19 2014

harfbuzz: Branch 'master' - 2 commits

 src/hb-ot-shape-complex-indic.cc                                        |    1 
 src/hb-ot-shape-complex-myanmar.cc                                      |   18 ++++++++++
 src/hb-ot-shape-complex-private.hh                                      |    5 +-
 src/hb-ot-shape.cc                                                      |    2 -
 test/shaping/Makefile.am                                                |    1 
 test/shaping/fonts/sha1sum/MANIFEST                                     |    1 
 test/shaping/fonts/sha1sum/bb9473d2403488714043bcfb946c9f78b86ad627.ttf |binary
 test/shaping/tests/MANIFEST                                             |    1 
 test/shaping/tests/zero-width-marks.tests                               |    1 
 9 files changed, 27 insertions(+), 3 deletions(-)

New commits:
commit 6f2d9ba52a6d1e3fc200da1ef0e85ba020fcd0dc
Author: Behdad Esfahbod <behdad@...>
Date:   Sat Jul 26 19:17:44 2014 -0400

    Add old-Myanmar shaper

    Looks like Unsicribe responds to the 'mymr' tag by zeroing marks
    GDEF_LATE instead of generic-shaper UNICODE_LATE.  Implement that.

    Fixes
    Bug 81775 - Incorrect Rendering with harfbuzz-ng myanmar unicode
    https://bugs.freedesktop.org/show_bug.cgi?id=81775

    Micro-test added based on Padauk.

diff --git a/src/hb-ot-shape-complex-myanmar.cc b/src/hb-ot-shape-complex-myanmar.cc
index 258ccc4..d016380 100644
--- a/src/hb-ot-shape-complex-myanmar.cc
+++ b/src/hb-ot-shape-complex-myanmar.cc
 <at>  <at>  -536,6 +536,24  <at>  <at>  final_reordering (const hb_ot_shape_plan_t *plan,
 }

 
+/* Uniscribe seems to have a shaper for 'mymr' that is like the
+ * generic shaper, except that it zeros mark advances GDEF_LATE. */
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_old =
+{
+  "default",
+  NULL, /* collect_features */
+  NULL, /* override_features */
+  NULL, /* data_create */
+  NULL, /* data_destroy */
+  NULL, /* preprocess_text */
+  HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
+  NULL, /* decompose */
+  NULL, /* compose */
+  NULL, /* setup_masks */
+  HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
+  true, /* fallback_position */
+};
+
 const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar =
 {
   "myanmar",
diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
index 3e581af..9a7afcb 100644
--- a/src/hb-ot-shape-complex-private.hh
+++ b/src/hb-ot-shape-complex-private.hh
 <at>  <at>  -56,6 +56,7  <at>  <at>  enum hb_ot_shape_zero_width_marks_type_t {
   HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \
   HB_COMPLEX_SHAPER_IMPLEMENT (hangul) \
   HB_COMPLEX_SHAPER_IMPLEMENT (hebrew) \
+  HB_COMPLEX_SHAPER_IMPLEMENT (myanmar_old) \
   HB_COMPLEX_SHAPER_IMPLEMENT (indic) \
   HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \
   HB_COMPLEX_SHAPER_IMPLEMENT (sea) \
 <at>  <at>  -329,10 +330,10  <at>  <at>  hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
 	return &_hb_ot_complex_shaper_default;

     case HB_SCRIPT_MYANMAR:
-      /* For Myanmar, we only want to use the Myanmar shaper if the "new" script
-       * tag is found.  For "old" script tag we want to use the default shaper. */
       if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','2'))
 	return &_hb_ot_complex_shaper_myanmar;
+      else if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','r'))
+	return &_hb_ot_complex_shaper_myanmar_old;
       else
 	return &_hb_ot_complex_shaper_default;

diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index c2c4db6..f40f2ff 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
 <at>  <at>  -41,6 +41,7  <at>  <at>  TESTS = \
 	tests/indic-old-spec.tests \
 	tests/indic-pref-blocking.tests \
 	tests/mongolian-variation-selector.tests \
+	tests/zero-width-marks.tests \
 	$(NULL)

 TEST_EXTENSIONS = \
diff --git a/test/shaping/fonts/sha1sum/MANIFEST b/test/shaping/fonts/sha1sum/MANIFEST
index 4aaa54d..0e9da64 100644
--- a/test/shaping/fonts/sha1sum/MANIFEST
+++ b/test/shaping/fonts/sha1sum/MANIFEST
 <at>  <at>  -7,6 +7,7  <at>  <at> 
 8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf
 a919b33197965846f21074b24e30250d67277bce.ttf
 bb29ce50df2bdba2d10726427c6b7609bf460e04.ttf
+bb9473d2403488714043bcfb946c9f78b86ad627.ttf
 d629e7fedc0b350222d7987345fe61613fa3929a.ttf
 e207635780b42f898d58654b65098763e340f5c7.ttf
 ef86fe710cfea877bbe0dbb6946a1f88d0661031.ttf
diff --git a/test/shaping/fonts/sha1sum/bb9473d2403488714043bcfb946c9f78b86ad627.ttf b/test/shaping/fonts/sha1sum/bb9473d2403488714043bcfb946c9f78b86ad627.ttf
new file mode 100644
index 0000000..b16dae6
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/bb9473d2403488714043bcfb946c9f78b86ad627.ttf differ
diff --git a/test/shaping/tests/MANIFEST b/test/shaping/tests/MANIFEST
index a792e91..8c2bdca 100644
--- a/test/shaping/tests/MANIFEST
+++ b/test/shaping/tests/MANIFEST
 <at>  <at>  -3,3 +3,4  <at>  <at>  context-matching.tests
 indic-old-spec.tests
 indic-pref-blocking.tests
 mongolian-variation-selector.tests
+zero-width-marks.tests
diff --git a/test/shaping/tests/zero-width-marks.tests b/test/shaping/tests/zero-width-marks.tests
new file mode 100644
index 0000000..bfe0809
--- /dev/null
+++ b/test/shaping/tests/zero-width-marks.tests
 <at>  <at>  -0,0 +1  <at>  <at> 
+fonts/sha1sum/bb9473d2403488714043bcfb946c9f78b86ad627.ttf:U+1030:[circledash=0+636|u1030.med=0 <at> -162,0+0]
commit 595d2b96c37de8147489dc5e0ddcc4ab1ad3eea9
Author: Behdad Esfahbod <behdad@...>
Date:   Sat Jul 26 18:44:15 2014 -0400

    Minor

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index be5d574..7723600 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
 <at>  <at>  -1285,6 +1285,7  <at>  <at>  insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
       info.cluster = buffer->cur().cluster;
       info.mask = buffer->cur().mask;
       info.syllable() = buffer->cur().syllable();
+      /* TODO Set glyph_props? */

       /* Insert dottedcircle after possible Repha. */
       while (buffer->idx < buffer->len &&
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index 1f99014..66846ed 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
 <at>  <at>  -243,7 +243,7  <at>  <at>  hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
   if (!font->has_glyph (0x25CCu))
     return;

-  hb_glyph_info_t dottedcircle;
+  hb_glyph_info_t dottedcircle = {0};
   dottedcircle.codepoint = 0x25CCu;
   _hb_glyph_info_set_unicode_props (&dottedcircle, buffer->unicode);

Behdad Esfahbod | 25 Jul 18:43 2014

harfbuzz: Branch 'master' - 13 commits

 src/hb-common.h             |    2 
 src/hb-open-type-private.hh |    2 
 src/hb-ot-layout-private.hh |    2 
 src/hb-private.hh           |    2 
 src/hb-shape.cc             |  102 +++++++++++++++++++++++++++++++++-----------
 util/options.cc             |    4 +
 6 files changed, 85 insertions(+), 29 deletions(-)

New commits:
commit fe6788bc570d77d5b3aafc68efd51ca6b80499b1
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:40:56 2014 -0400

    Typo

diff --git a/src/hb-common.h b/src/hb-common.h
index 32a62e5..f5141b9 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
 <at>  <at>  -316,7 +316,7  <at>  <at>  typedef enum
 hb_script_t
 hb_script_from_iso15924_tag (hb_tag_t tag);

-/* suger for tag_from_string() then script_from_iso15924_tag */
+/* sugar for tag_from_string() then script_from_iso15924_tag */
 /* len=-1 means s is NUL-terminated */
 hb_script_t
 hb_script_from_string (const char *s, int len);
commit 0de25d4184d2d92b1a2ebb6fa054275aaae4c316
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:35:03 2014 -0400

    [util] Note CSS compatibility in --help-features

diff --git a/util/options.cc b/util/options.cc
index 738fb7a..0adc179 100644
--- a/util/options.cc
+++ b/util/options.cc
 <at>  <at>  -304,7 +304,9  <at>  <at>  shape_options_t::add_options (option_parser_t *parser)
   const gchar *features_help = "Comma-separated list of font features\n"
     "\n"
     "    Features can be enabled or disabled, either globally or limited to\n"
-    "    specific character ranges.\n"
+    "    specific character ranges.  The format for specifying feature settings\n"
+    "    follows.  All valid CSS font-feature-settings values other than 'normal'\n"
+    "    and 'inherited' are also accepted, though, not documented below.\n"
     "\n"
     "    The range indices refer to the positions between Unicode characters,\n"
     "    unless the --utf8-clusters is provided, in which case range indices\n"
commit 6e69200a2aadbc6bba35ffb4a058c14286b84f46
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:30:47 2014 -0400

    Fix snprintf() format

    Patch from Maks Naumov.
    Fixes https://github.com/behdad/harfbuzz/pull/22

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index efe3bff..812cf59 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -257,18 +257,18  <at>  <at>  hb_feature_to_string (hb_feature_t *feature,
   {
     s[len++] = '[';
     if (feature->start)
-      len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%d", feature->start));
+      len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->start));
     if (feature->end != feature->start + 1) {
       s[len++] = ':';
       if (feature->end != (unsigned int) -1)
-	len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%d", feature->end));
+	len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->end));
     }
     s[len++] = ']';
   }
   if (feature->value > 1)
   {
     s[len++] = '=';
-    len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%d", feature->value));
+    len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%u", feature->value));
   }
   assert (len < ARRAY_LENGTH (s));
   len = MIN (len, size - 1);
commit 5c5cdbbdf8be231c433e21b050a6c6991d327b61
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:21:49 2014 -0400

    Make sure broken feature strings are not partially parsed

    If user doesn't check hb_feature_from_string() return value, we
    don't want them to end up see the partially-parsed feature.

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index f5a4ef2..efe3bff 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -37,8 +37,7  <at>  <at> 
 static bool
 parse_space (const char **pp, const char *end)
 {
-  char c;
-  while (*pp < end && (c = **pp, ISSPACE (c)))
+  while (*pp < end && ISSPACE (**pp))
     (*pp)++;
   return true;
 }
 <at>  <at>  -201,7 +200,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> len: 
- *  <at> feature: (out):
+ *  <at> feature: (out) (allow-none):
  *
  * 
  *
 <at>  <at>  -213,10 +212,21  <at>  <at>  hb_bool_t
 hb_feature_from_string (const char *str, int len,
 			hb_feature_t *feature)
 {
+  hb_feature_t feat;
+
   if (len < 0)
     len = strlen (str);

-  return parse_one_feature (&str, str + len, feature);
+  if (likely (parse_one_feature (&str, str + len, &feat)))
+  {
+    if (feature)
+      *feature = feat;
+    return true;
+  }
+
+  if (feature)
+    memset (feature, 0, sizeof (*feature));
+  return false;
 }

 /**
commit a795fe637846e0d9561d2f7cdd84cfafd58b23a7
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:15:33 2014 -0400

    Allow quotation marks around feature tag in hb_feature_from_string()

    With this, I believe we accept CSS feature strings completely.

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 2ed6ce9..f5a4ef2 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -117,16 +117,34  <at>  <at>  parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature)
 {
   parse_space (pp, end);

-  const char *p = *pp;
-  char c;
+  char quote = 0;
+
+  if (*pp < end && (**pp == '\'' || **pp == '"'))
+  {
+    quote = **pp;
+    (*pp)++;
+  }

-  while (*pp < end && (c = **pp, ISALNUM(c)))
+  const char *p = *pp;
+  while (*pp < end && ISALNUM(**pp))
     (*pp)++;

   if (p == *pp || *pp - p > 4)
     return false;

   feature->tag = hb_tag_from_string (p, *pp - p);
+
+  if (quote)
+  {
+    /* CSS expects exactly four bytes.  And we only allow quotations for
+     * CSS compatibility.  So, enforce the length. */
+     if (*pp - p != 4)
+       return false;
+    if (*pp == end || **pp != quote)
+      return false;
+    (*pp)++;
+  }
+
   return true;
 }

commit 3f6461847412e78bcddc8eba97200f3afcde869a
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:04:27 2014 -0400

    Allow space at the end of feature string with values, eg 'dlig=1 '

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 94c6f72..2ed6ce9 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -34,12 +34,13  <at>  <at> 
 #include "hb-font-private.hh"

 
-static void
+static bool
 parse_space (const char **pp, const char *end)
 {
   char c;
   while (*pp < end && (c = **pp, ISSPACE (c)))
     (*pp)++;
+  return true;
 }

 static bool
 <at>  <at>  -174,6 +175,7  <at>  <at>  parse_one_feature (const char **pp, const char *end, hb_feature_t *feature)
 	 parse_feature_tag (pp, end, feature) &&
 	 parse_feature_indices (pp, end, feature) &&
 	 parse_feature_value_postfix (pp, end, feature) &&
+	 parse_space (pp, end) &&
 	 *pp == end;
 }

commit f31f7d2259dd8edffc070af55938cb7aa23514c1
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:03:52 2014 -0400

    Minor

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 93311b4..94c6f72 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -42,7 +42,7  <at>  <at>  parse_space (const char **pp, const char *end)
     (*pp)++;
 }

-static hb_bool_t
+static bool
 parse_char (const char **pp, const char *end, char c)
 {
   parse_space (pp, end);
 <at>  <at>  -54,7 +54,7  <at>  <at>  parse_char (const char **pp, const char *end, char c)
   return true;
 }

-static hb_bool_t
+static bool
 parse_uint (const char **pp, const char *end, unsigned int *pv)
 {
   char buf[32];
 <at>  <at>  -78,7 +78,7  <at>  <at>  parse_uint (const char **pp, const char *end, unsigned int *pv)
   return true;
 }

-static hb_bool_t
+static bool
 parse_bool (const char **pp, const char *end, unsigned int *pv)
 {
   parse_space (pp, end);
 <at>  <at>  -98,7 +98,7  <at>  <at>  parse_bool (const char **pp, const char *end, unsigned int *pv)
   return true;
 }

-static hb_bool_t
+static bool
 parse_feature_value_prefix (const char **pp, const char *end, hb_feature_t *feature)
 {
   if (parse_char (pp, end, '-'))
 <at>  <at>  -111,7 +111,7  <at>  <at>  parse_feature_value_prefix (const char **pp, const char *end, hb_feature_t *feat
   return true;
 }

-static hb_bool_t
+static bool
 parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature)
 {
   parse_space (pp, end);
 <at>  <at>  -129,12 +129,12  <at>  <at>  parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature)
   return true;
 }

-static hb_bool_t
+static bool
 parse_feature_indices (const char **pp, const char *end, hb_feature_t *feature)
 {
   parse_space (pp, end);

-  hb_bool_t has_start;
+  bool has_start;

   feature->start = 0;
   feature->end = (unsigned int) -1;
 <at>  <at>  -154,7 +154,7  <at>  <at>  parse_feature_indices (const char **pp, const char *end, hb_feature_t *feature)
   return parse_char (pp, end, ']');
 }

-static hb_bool_t
+static bool
 parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature)
 {
   bool had_equal = parse_char (pp, end, '=');
 <at>  <at>  -167,7 +167,7  <at>  <at>  parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *fea
 }

 
-static hb_bool_t
+static bool
 parse_one_feature (const char **pp, const char *end, hb_feature_t *feature)
 {
   return parse_feature_value_prefix (pp, end, feature) &&
commit 60cb18a5dea2d30793f89e80995bb729c014864a
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 12:01:22 2014 -0400

    Allow on/off in hb_feature_from_string()

    We now allow things like "dlig on" / "dlig=on".

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 794cc1c..93311b4 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -79,6 +79,26  <at>  <at>  parse_uint (const char **pp, const char *end, unsigned int *pv)
 }

 static hb_bool_t
+parse_bool (const char **pp, const char *end, unsigned int *pv)
+{
+  parse_space (pp, end);
+
+  const char *p = *pp;
+  while (*pp < end && ISALPHA(**pp))
+    (*pp)++;
+
+  /* CSS allows on/off as aliases 1/0. */
+  if (*pp - p == 2 || 0 == strncmp (p, "on", 2))
+    *pv = 1;
+  else if (*pp - p == 3 || 0 == strncmp (p, "off", 2))
+    *pv = 0;
+  else
+    return false;
+
+  return true;
+}
+
+static hb_bool_t
 parse_feature_value_prefix (const char **pp, const char *end, hb_feature_t *feature)
 {
   if (parse_char (pp, end, '-'))
 <at>  <at>  -138,8 +158,10  <at>  <at>  static hb_bool_t
 parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature)
 {
   bool had_equal = parse_char (pp, end, '=');
-  bool had_value = parse_uint (pp, end, &feature->value);
-  /* If there was an equal-sign, then there *must* be a value.
+  bool had_value = parse_uint (pp, end, &feature->value) ||
+                   parse_bool (pp, end, &feature->value);
+  /* CSS doesn't use equal-sign between tag and value.
+   * If there was an equal-sign, then there *must* be a value.
    * A value without an eqaul-sign is ok, but not required. */
   return !had_equal || had_value;
 }
commit d9e618eca9e01c2eb6db65504af3f73be370a1e7
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 11:56:01 2014 -0400

    Remove duplicate definition of ISALNUM

    It's defined in hb-private.h already.

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 34298a1..794cc1c 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -99,10 +99,8  <at>  <at>  parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature)
   const char *p = *pp;
   char c;

-#define ISALNUM(c) (('a' <= (c) && (c) <= 'z') || ('A' <= (c) && (c) <= 'Z') || ('0' <= (c) && (c) <= '9'))
   while (*pp < end && (c = **pp, ISALNUM(c)))
     (*pp)++;
-#undef ISALNUM

   if (p == *pp || *pp - p > 4)
     return false;
commit 2ee5f665ded86147acedc400153c0b3a90fe07c6
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 11:53:46 2014 -0400

    Fix parsing of features like "- liga" (with the space)

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index b4d3004..34298a1 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -94,11 +94,11  <at>  <at>  parse_feature_value_prefix (const char **pp, const char *end, hb_feature_t *feat
 static hb_bool_t
 parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature)
 {
+  parse_space (pp, end);
+
   const char *p = *pp;
   char c;

-  parse_space (pp, end);
-
 #define ISALNUM(c) (('a' <= (c) && (c) <= 'z') || ('A' <= (c) && (c) <= 'Z') || ('0' <= (c) && (c) <= '9'))
   while (*pp < end && (c = **pp, ISALNUM(c)))
     (*pp)++;
commit e15fa7a8cffbe6a67b1048d7b87b7df77d8b1686
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 11:44:35 2014 -0400

    Do not require the '=' in hb_feature_from_string()

    Towards accepting CSS font-feature-settings strings.

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index a63a5c1..b4d3004 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -139,7 +139,11  <at>  <at>  parse_feature_indices (const char **pp, const char *end, hb_feature_t *feature)
 static hb_bool_t
 parse_feature_value_postfix (const char **pp, const char *end, hb_feature_t *feature)
 {
-  return !parse_char (pp, end, '=') || parse_uint (pp, end, &feature->value);
+  bool had_equal = parse_char (pp, end, '=');
+  bool had_value = parse_uint (pp, end, &feature->value);
+  /* If there was an equal-sign, then there *must* be a value.
+   * A value without an eqaul-sign is ok, but not required. */
+  return !had_equal || had_value;
 }

 
commit f4fe9baefdb7e0ff9946f88b6f4b55738fa30cdf
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 11:39:55 2014 -0400

    Reject tags longer than 4 chars in hb_feature_from_string()

diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index c1b7524..a63a5c1 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
 <at>  <at>  -104,7 +104,7  <at>  <at>  parse_feature_tag (const char **pp, const char *end, hb_feature_t *feature)
     (*pp)++;
 #undef ISALNUM

-  if (p == *pp)
+  if (p == *pp || *pp - p > 4)
     return false;

   feature->tag = hb_tag_from_string (p, *pp - p);
commit 7e8c38954649c0bf2e6051d84ca08dce090ec169
Author: Behdad Esfahbod <behdad@...>
Date:   Fri Jul 25 11:18:11 2014 -0400

    Minor warnings fixes

    Some systems insist on -Wmissing-field-initializers.  We have too many,
    by design.  Fix a few easy ones.

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 046df97..475187b 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
 <at>  <at>  -289,7 +289,7  <at>  <at>  template <typename Type>
 struct Sanitizer
 {
   static hb_blob_t *sanitize (hb_blob_t *blob) {
-    hb_sanitize_context_t c[1] = {{0}};
+    hb_sanitize_context_t c[1] = {{0, NULL, NULL, false, 0, NULL}};
     bool sane;

     /* TODO is_sane() stuff */
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
index 9b06300..d94ac50 100644
--- a/src/hb-ot-layout-private.hh
+++ b/src/hb-ot-layout-private.hh
 <at>  <at>  -127,7 +127,7  <at>  <at>  struct hb_ot_layout_lookup_accelerator_t
   }

   template <typename TLookup>
-  inline void fini (const TLookup &lookup)
+  inline void fini (const TLookup &lookup HB_UNUSED)
   {
   }

diff --git a/src/hb-private.hh b/src/hb-private.hh
index b24c9d1..5a4ca69 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
 <at>  <at>  -284,7 +284,7  <at>  <at>  typedef int (*hb_compare_func_t) (const void *, const void *);
 /* arrays and maps */

 
-#define HB_PREALLOCED_ARRAY_INIT {0}
+#define HB_PREALLOCED_ARRAY_INIT {0, 0, NULL}
 template <typename Type, unsigned int StaticSize=16>
 struct hb_prealloced_array_t
 {
Steven R. Loomis | 24 Jul 20:52 2014

ICU HarfBuzz updates

Hello folks, just a few updates:

* ICU's LayoutEngine is officially deprecated in favor of HarfBuzz,
starting in ICU v54. http://userguide.icu-project.org/layoutengine

* I've opened a ticket, http://bugs.icu-project.org/trac/ticket/11023 to
make the ICU layout*ex* (ParagraphLayout) library a standalone module,
building against the non-layout rest of ICU plus HarfBuzz's wrapper. 
Please add any comments to that ticket.

* The HarfBuzz-in-JDK project is hopefully kicking off soon, as seen in
http://mail.openjdk.java.net/pipermail/announce/2013-October/000154.html

Regards,
Steven

-- 

IBMer but all opinions are mine.
https://www.ohloh.net/accounts/srl295 // fingerprint  <at>  https://ssl.icu-project.org/trac/wiki/Srl

Hello folks, just a few updates:

* ICU's LayoutEngine is officially deprecated in favor of HarfBuzz,
starting in ICU v54. http://userguide.icu-project.org/layoutengine

* I've opened a ticket, http://bugs.icu-project.org/trac/ticket/11023 to
make the ICU layout*ex* (ParagraphLayout) library a standalone module,
building against the non-layout rest of ICU plus HarfBuzz's wrapper. 
Please add any comments to that ticket.

* The HarfBuzz-in-JDK project is hopefully kicking off soon, as seen in
http://mail.openjdk.java.net/pipermail/announce/2013-October/000154.html

Regards,
Steven

--

-- 

IBMer but all opinions are mine.
https://www.ohloh.net/accounts/srl295 // fingerprint  <at>  https://ssl.icu-project.org/trac/wiki/Srl

Behdad Esfahbod | 23 Jul 22:53 2014

harfbuzz: Branch 'master'

 src/hb-ot-shape-complex-indic.cc                                             |   28 ++++++++--
 test/shaping/Makefile.am                                                     |    1 
 test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf      |binary
 test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf      |binary
 test/shaping/fonts/sha1sum/MANIFEST                                          |    2 
 test/shaping/tests/MANIFEST                                                  |    1 
 test/shaping/tests/indic-old-spec.tests                                      |    2 
 test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt |    1 
 8 files changed, 30 insertions(+), 5 deletions(-)

New commits:
commit fc0daafab0336b847ac14682e581a8838f36a0bf
Author: Behdad Esfahbod <behdad@...>
Date:   Wed Jul 23 16:48:51 2014 -0400

    [indic] Handle old-spec Malayalam reordering with final Halant

    See comment.

    Micro-tests added.

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 33215a3..be5d574 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
 <at>  <at>  -921,14 +921,32  <at>  <at>  initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
     info[start].indic_position() = POS_RA_TO_BECOME_REPH;

   /* For old-style Indic script tags, move the first post-base Halant after
-   * last consonant.  Only do this if there is *not* a Halant after last
-   * consonant.  Otherwise it becomes messy. */
-  if (indic_plan->is_old_spec) {
+   * last consonant.
+   *
+   * Reports suggest that in some scripts Uniscribe does this only if there
+   * is *not* a Halant after last consonant already (eg. Kannada), while it
+   * does it unconditionally in other scripts (eg. Malayalam).  We don't
+   * currently know about other scripts, so we single out Malayalam for now.
+   *
+   * Kannada test case:
+   * U+0C9A,U+0CCD,U+0C9A,U+0CCD
+   * With some versions of Lohit Kannada.
+   * https://bugs.freedesktop.org/show_bug.cgi?id=59118
+   *
+   * Malayalam test case:
+   * U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D
+   * With lohit-ttf-20121122/Lohit-Malayalam.ttf
+   */
+  if (indic_plan->is_old_spec)
+  {
+    bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM;
     for (unsigned int i = base + 1; i < end; i++)
-      if (info[i].indic_category() == OT_H) {
+      if (info[i].indic_category() == OT_H)
+      {
         unsigned int j;
         for (j = end - 1; j > i; j--)
-	  if (is_consonant (info[j]) || info[j].indic_category() == OT_H)
+	  if (is_consonant (info[j]) ||
+	      (disallow_double_halants && info[j].indic_category() == OT_H))
 	    break;
 	if (info[j].indic_category() != OT_H && j > i) {
 	  /* Move Halant to after last consonant. */
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index 4cc79b8..c2c4db6 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
 <at>  <at>  -38,6 +38,7  <at>  <at>  CLEANFILES += \
 TESTS = \
 	tests/arabic-feature-order.tests \
 	tests/context-matching.tests \
+	tests/indic-old-spec.tests \
 	tests/indic-pref-blocking.tests \
 	tests/mongolian-variation-selector.tests \
 	$(NULL)
diff --git a/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf b/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf
new file mode 100644
index 0000000..fc22649
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf differ
diff --git a/test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf b/test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
new file mode 100644
index 0000000..746fc60
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf differ
diff --git a/test/shaping/fonts/sha1sum/MANIFEST b/test/shaping/fonts/sha1sum/MANIFEST
index cd2ede5..4aaa54d 100644
--- a/test/shaping/fonts/sha1sum/MANIFEST
+++ b/test/shaping/fonts/sha1sum/MANIFEST
 <at>  <at>  -1,6 +1,8  <at>  <at> 
 226bc2deab3846f1a682085f70c67d0421014144.ttf
+270b89df543a7e48e206a2d830c0e10e5265c630.ttf
 37033cc5cf37bb223d7355153016b6ccece93b28.ttf
 4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
+57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
 813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf
 8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf
 a919b33197965846f21074b24e30250d67277bce.ttf
diff --git a/test/shaping/tests/MANIFEST b/test/shaping/tests/MANIFEST
index 1b577c7..a792e91 100644
--- a/test/shaping/tests/MANIFEST
+++ b/test/shaping/tests/MANIFEST
 <at>  <at>  -1,4 +1,5  <at>  <at> 
 arabic-feature-order.tests
 context-matching.tests
+indic-old-spec.tests
 indic-pref-blocking.tests
 mongolian-variation-selector.tests
diff --git a/test/shaping/tests/indic-old-spec.tests b/test/shaping/tests/indic-old-spec.tests
new file mode 100644
index 0000000..96e8cdd
--- /dev/null
+++ b/test/shaping/tests/indic-old-spec.tests
 <at>  <at>  -0,0 +1,2  <at>  <at> 
+fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf:U+0C9A,U+0CCD,U+0C9A,U+0CCD:[U0C9A_U0CCD.haln=0+1066|U0C9A_0CCD.blwf=0+0]
+fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf:U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D:[glyph201=0+1183|U0D4D=0+0]
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt
index c5144f0..2e732ae 100644
--- a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt
 <at>  <at>  -62,3 +62,4  <at>  <at> 
 ശിം‌
 കോം‌
 യ‍്യ
+സ്റ്റ്
 src/hb-ot-shape-complex-indic.cc                                             |   28 ++++++++--
 test/shaping/Makefile.am                                                     |    1 
 test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf      |binary
 test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf      |binary
 test/shaping/fonts/sha1sum/MANIFEST                                          |    2 
 test/shaping/tests/MANIFEST                                                  |    1 
 test/shaping/tests/indic-old-spec.tests                                      |    2 
 test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt |    1 
 8 files changed, 30 insertions(+), 5 deletions(-)

New commits:
commit fc0daafab0336b847ac14682e581a8838f36a0bf
Author: Behdad Esfahbod <behdad@...>
Date:   Wed Jul 23 16:48:51 2014 -0400

    [indic] Handle old-spec Malayalam reordering with final Halant

    See comment.

    Micro-tests added.

diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 33215a3..be5d574 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
 <at>  <at>  -921,14 +921,32  <at>  <at>  initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
     info[start].indic_position() = POS_RA_TO_BECOME_REPH;

   /* For old-style Indic script tags, move the first post-base Halant after
-   * last consonant.  Only do this if there is *not* a Halant after last
-   * consonant.  Otherwise it becomes messy. */
-  if (indic_plan->is_old_spec) {
+   * last consonant.
+   *
+   * Reports suggest that in some scripts Uniscribe does this only if there
+   * is *not* a Halant after last consonant already (eg. Kannada), while it
+   * does it unconditionally in other scripts (eg. Malayalam).  We don't
+   * currently know about other scripts, so we single out Malayalam for now.
+   *
+   * Kannada test case:
+   * U+0C9A,U+0CCD,U+0C9A,U+0CCD
+   * With some versions of Lohit Kannada.
+   * https://bugs.freedesktop.org/show_bug.cgi?id=59118
+   *
+   * Malayalam test case:
+   * U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D
+   * With lohit-ttf-20121122/Lohit-Malayalam.ttf
+   */
+  if (indic_plan->is_old_spec)
+  {
+    bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM;
     for (unsigned int i = base + 1; i < end; i++)
-      if (info[i].indic_category() == OT_H) {
+      if (info[i].indic_category() == OT_H)
+      {
         unsigned int j;
         for (j = end - 1; j > i; j--)
-	  if (is_consonant (info[j]) || info[j].indic_category() == OT_H)
+	  if (is_consonant (info[j]) ||
+	      (disallow_double_halants && info[j].indic_category() == OT_H))
 	    break;
 	if (info[j].indic_category() != OT_H && j > i) {
 	  /* Move Halant to after last consonant. */
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index 4cc79b8..c2c4db6 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
 <at>  <at>  -38,6 +38,7  <at>  <at>  CLEANFILES += \
 TESTS = \
 	tests/arabic-feature-order.tests \
 	tests/context-matching.tests \
+	tests/indic-old-spec.tests \
 	tests/indic-pref-blocking.tests \
 	tests/mongolian-variation-selector.tests \
 	$(NULL)
diff --git a/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf b/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf
new file mode 100644
index 0000000..fc22649
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf differ
diff --git a/test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf b/test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
new file mode 100644
index 0000000..746fc60
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf differ
diff --git a/test/shaping/fonts/sha1sum/MANIFEST b/test/shaping/fonts/sha1sum/MANIFEST
index cd2ede5..4aaa54d 100644
--- a/test/shaping/fonts/sha1sum/MANIFEST
+++ b/test/shaping/fonts/sha1sum/MANIFEST
 <at>  <at>  -1,6 +1,8  <at>  <at> 
 226bc2deab3846f1a682085f70c67d0421014144.ttf
+270b89df543a7e48e206a2d830c0e10e5265c630.ttf
 37033cc5cf37bb223d7355153016b6ccece93b28.ttf
 4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
+57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
 813c2f8e5512187fd982417a7fb4286728e6f4a8.ttf
 8a9fea2a7384f2116e5b84a9b31f83be7850ce21.ttf
 a919b33197965846f21074b24e30250d67277bce.ttf
diff --git a/test/shaping/tests/MANIFEST b/test/shaping/tests/MANIFEST
index 1b577c7..a792e91 100644
--- a/test/shaping/tests/MANIFEST
+++ b/test/shaping/tests/MANIFEST
 <at>  <at>  -1,4 +1,5  <at>  <at> 
 arabic-feature-order.tests
 context-matching.tests
+indic-old-spec.tests
 indic-pref-blocking.tests
 mongolian-variation-selector.tests
diff --git a/test/shaping/tests/indic-old-spec.tests b/test/shaping/tests/indic-old-spec.tests
new file mode 100644
index 0000000..96e8cdd
--- /dev/null
+++ b/test/shaping/tests/indic-old-spec.tests
 <at>  <at>  -0,0 +1,2  <at>  <at> 
+fonts/sha1sum/57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf:U+0C9A,U+0CCD,U+0C9A,U+0CCD:[U0C9A_U0CCD.haln=0+1066|U0C9A_0CCD.blwf=0+0]
+fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf:U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D:[glyph201=0+1183|U0D4D=0+0]
diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt
index c5144f0..2e732ae 100644
--- a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt
 <at>  <at>  -62,3 +62,4  <at>  <at> 
 ശിം‌
 കോം‌
 യ‍്യ
+സ്റ്റ്
Behdad Esfahbod | 23 Jul 17:39 2014

harfbuzz: Branch 'master'

 src/Makefile.am |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit d6d349d17898529ecdf8217a54987a3e9f81ce05
Author: Behdad Esfahbod <behdad@...>
Date:   Wed Jul 23 11:38:49 2014 -0400

    Give CC to gir-scanner

    From:
    https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-harfbuzz/0001-give-cc-to-gir-scanner.all.patch

diff --git a/src/Makefile.am b/src/Makefile.am
index 5832f75..acedaa0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
 <at>  <at>  -361,6 +361,7  <at>  <at>  if HAVE_INTROSPECTION
 INTROSPECTION_GIRS = HarfBuzz-$(HB_VERSION_MAJOR).0.gir # What does the 0 mean anyway?!
 INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_ --warn-all
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+INTROSPECTION_SCANNER_ENV = CC="$(CC)"

 HarfBuzz-0.0.gir: libharfbuzz.la libharfbuzz-gobject.la
 HarfBuzz_0_0_gir_INCLUDES = GObject-2.0

Gmane