Re: [HarfBuzz] Indic support in Harfbuzz

2009-12-11 Thread Jonathan Kew
On 10 Dec 2009, at 21:29, Parag Nemade wrote: Hi, I would like to know whether current harfbuzz code can be used for testing the rendering of Indic scripts? Not easily, I think. A little while ago, I started work on Indic support (initially concentrating on the new Devanagari standard

Re: [HarfBuzz] Text Layout Summit around LGM

2010-03-03 Thread Jonathan Kew
On 3 Mar 2010, at 19:20, Behdad Esfahbod wrote: On 03/03/2010 01:45 PM, Jonathan Kew wrote: On 3 Mar 2010, at 18:41, Behdad Esfahbod wrote: Ok, lets think about this more seriously. Who'll be there if we do the summit? LGM is April 26..28 in Brussels. Is it? According to http

[HarfBuzz] mirroring support in hb_shape

2010-04-02 Thread Jonathan Kew
Hi Behdad, I think there's an issue with how (or rather *where*) mirroring is implemented -- currently hb_mirror_chars is called from hb_substitute_default, right before hb_map_glyphs. The problem with this is that by the time hb_substitute_default is called, the buffer has been forced to

Re: [HarfBuzz] HarfBuzz hacking sprint in planning

2010-04-12 Thread Jonathan Kew
to a meeting. It would be really nice to have Jonathan Kew, Evin Martin, and Daniel Glassy. How does your schedules look like for that week? That could work for me. I've put it (tentatively) on the calendar. JK We'd got to decide fast since I need to go figure my visa out. Martin kindly offered

Re: [HarfBuzz] harfbuzz review

2010-04-16 Thread Jonathan Kew
No, I'm not suggesting a different serialization format, I'm saying that instead of caching the full GSUB/GPOS tables it might be better to cache some data structure that's been distilled for a given purpose. For a lot of documents, hb_shape will be called repeatedly with the same

[HarfBuzz] static_assertion failure in latest harfbuzz-ng code

2010-04-24 Thread Jonathan Kew
On 24 Apr 2010, at 00:54, Behdad Esfahbod wrote: - Tagtag;/* 4-byte identifier. */ + private: + union { + Tagtag;/* 4-byte identifier. */ + OpenTypeFontFace fontFace[VAR]; + TTCHeader ttcHeader[VAR]; + } u;

[HarfBuzz] potential crash in sanitizer code

2010-07-20 Thread Jonathan Kew
Hi Behdad, We've run across a case where the sanitizer crashes (division by zero) on invalid data. This happens if *none* of the possible fields are actually specified as present in ValueFormat, so that the record_size passed to check_array() is zero. Suggested patch attached. This allows a

Re: [HarfBuzz] 'mset' feature

2010-07-27 Thread Jonathan Kew
On 27 Jul 2010, at 18:12, Behdad Esfahbod wrote: Jonathan, I don't remember what your reply was last time. Should we apply 'mset' by default? I think we should apply it by default in the Arabic shaper, but not in the generic one. I don't remember last time, but that's my reply today,

[HarfBuzz] potential divide-by-zero in GPOS sanitizer

2010-08-13 Thread Jonathan Kew
Hi Behdad, It's possible for AnchorMatrix::sanitize() to fail with a div-by-zero error, if the 'rows' field is zero. (See https://bugzilla.mozilla.org/show_bug.cgi?id=586501.) Patch is attached. JK bug-586501-AnchorMatrix-sanitize.patch Description: Binary data

[HarfBuzz] Should MarkToBase attachment zero the mark advance?

2010-08-23 Thread Jonathan Kew
Hi Behdad, I notice that the code in MarkArray::apply() includes the following: hb_internal_glyph_position_t o = c-buffer-pos[c-buffer-i]; o.x_advance = 0; o.y_advance = 0; o.x_offset = base_x - mark_x; o.y_offset = base_y - mark_y; o.back = c-buffer-i - glyph_pos;

Re: [HarfBuzz] Question about HarfBuzz-ng CTL Shaper Status

2010-09-16 Thread Jonathan Kew
On 16 Sep 2010, at 15:29, Ed wrote: On Thu, Sep 16, 2010 at 3:42 AM, Jonathan Kew jonat...@jfkew.plus.com wrote: On 16 Sep 2010, at 02:33, Ed wrote: Hi, Behdad and everyone, Just want to confirm something: I thought Harfbuzz-ng did not yet have complex text shaper support

Re: [HarfBuzz] Question about HarfBuzz-ng CTL Shaper Status

2010-09-16 Thread Jonathan Kew
On 16 Sep 2010, at 22:43, Ed wrote: Thanks for the very useful information, Jonathan! What I am seeing so far (for Tai Tham) is that I can get GSUB ccmp with dflt ligature substitutions to work on both FF-3.6x, FF-4x-linux, and FF-4x-osx. This suggests that pango (on Linux) and CoreText

[HarfBuzz] infinite loops in hb_ot_tag_from_language()

2010-10-12 Thread Jonathan Kew
Hi Behdad, There are a couple of infinite loops (they fail to increment the counter variable) in hb_ot_tag_from_language(), in the x-hbot... case: while (i 4 IS_LETTER (lang_str[i])) { tag[i] = TO_UPPER (lang_str[i]); } while (i 4) tag[i] = ' '; Neither of these

[HarfBuzz] unreachable code in harfbuzz HeadlessArrayOf::sanitize and GenericArrayOf::sanitize

2010-10-12 Thread Jonathan Kew
Hi Behdad, Please see https://bugzilla.mozilla.org/show_bug.cgi?id=603346 it's harmless, but see comment #3 there. JK ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz

[HarfBuzz] hb_font_funcs_is_immutable() is wrong

2010-10-13 Thread Jonathan Kew
Hi Behdad, This function, from hb-font.cc, doesn't look right to me. hb_bool_t hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs) { return ffuncs-immutable = TRUE; } I suggest removing the = TRUE here! (Maybe it'd be worth declaring the parameter as const for query functions

Re: [HarfBuzz] harfbuzz coordinate system

2010-10-29 Thread Jonathan Kew
On 29 Oct 2010, at 01:55, Martin Hosken wrote: Dear Behdad, I think I'm going to make that change, especially since everytime I hooked up HarfBuzz to another system, it worked the first try except for a missing negation sign for y_offset. I don't think it matters too much which way you

Re: [HarfBuzz] TrueType spec bsearch algorithm?

2010-11-05 Thread Jonathan Kew
On 5 Nov 2010, at 00:02, Behdad Esfahbod wrote: Hi Jonathan, So, many places in the TrueType spec, there are these searchRange, entrySelector, and rangeShift values that seem to be there to facilitate a fast binary search algorithm. I cannot quite get the intended algorithm though (not

[HarfBuzz] broken shaping for Arabic with LTR override

2010-12-07 Thread Jonathan Kew
Hi Behdad, I've noticed that shaping isn't working correctly for text with overridden direction; this shows up with examples like data:text/html,p style=unicode-bidi:bidi-override;direction:ltr;font-family:scheherazadeالعربي in harfbuzz-ng-based Firefox builds. The problem arises because

Re: [HarfBuzz] Why does kerning modify glyph advance?

2011-02-14 Thread Jonathan Kew
On 14 Feb 2011, at 12:20, Tom Hacohen wrote: Dear all, Hey, there's a question I've been meaning to ask for a long time now, why does kerning modify the x_advance and not the x_offset? The way I see it, with this behavior x_advance of a char depends on it's position which eliminates the

Re: [HarfBuzz] FreeType/Cairo example

2011-02-20 Thread Jonathan Kew
On 20 Feb 2011, at 14:39, Khaled Hosny wrote: On Sun, Feb 20, 2011 at 04:29:49PM +0200, Khaled Hosny wrote: I'm trying to write a simple HB test and thought using FreeType/Cairo would be the shortest path. I got the code to shape the text, but glyph positions are wrong (at least horizontal

Re: [HarfBuzz] [PATCH] Added an Indic shaper

2011-04-21 Thread Jonathan Kew
On 21 Apr 2011, at 15:48, Tom Hacohen wrote: Dear all, Thanks to Olivier Berten who let me know that all I need is to tell hb which opentype features I want to use in order for Indic to work, I got Indic scripts to work. As said before, I can't read these languages, but from what I have

Re: [HarfBuzz] [PATCH] Added an Indic shaper

2011-04-21 Thread Jonathan Kew
On 21 Apr 2011, at 16:01, Tom Hacohen wrote: On Thu, 2011-04-21 at 15:54 +0100, Jonathan Kew wrote: I'm afraid this is _not_ sufficient to get correct rendering of most (all?) Indic scripts. In addition to the application of OpenType features, Indic scripts require reordering of certain

Re: [HarfBuzz] Text Layout Summit at Desktop Summit?

2011-06-23 Thread Jonathan Kew
On 23 Jun 2011, at 18:41, Behdad Esfahbod wrote: Hi, Can I get a quick show of hands of who's in for a Text Layout Summit at Desktop Summit (the combined GUADEC / aKademy conferences) this August? Lets say, August 8th to 12th? My main goals for the summit would be to: - Get the Qt

Re: [HarfBuzz] Quick show of hands needed

2011-07-21 Thread Jonathan Kew
On 21 Jul 2011, at 04:21, Behdad Esfahbod wrote: I'm wondering: should harfbuzz try compatibility composition/decomposition (NFKC/NFKD) if a font doesn't support a character? No, I don't think this belongs in a shaping/rendering engine. JK ___

Re: [HarfBuzz] indic differences

2011-09-07 Thread Jonathan Kew
Hi Martin, Could you confirm (a) which rendering is which in your listing, and (b) what font was being used - thanks! JK On 7 Sep 2011, at 10:17, Martin Hosken wrote: Dear Behdad, I enclose a run of a hindi wordlist comparing hbng with icu renderings of the same text. I only record

Re: [HarfBuzz] indic differences

2011-09-07 Thread Jonathan Kew
On 7 Sep 2011, at 10:57, Martin Hosken wrote: Dear Jonathan, Could you confirm (a) which rendering is which in your listing, and (b) what font was being used - thanks! The first [] contains the hbng glyph sequence and the second [] contains the icu. The font is Annapurna SIL available

Re: [HarfBuzz] Valid range of deltaGlyphID is too small

2011-09-27 Thread Jonathan Kew
On 27 Sep 2011, at 11:04, Dohyun Kim wrote: Hi, While testing harfbuzz-ng with a huge font which has more than 64,000 glyphs, I encountered a strange result of hb-shape: uniAC00=0+970|gid-1389=0|uniB098=6+970|gid-1388=6 As shown, minus GID numbers are printed on the screen; this of

[HarfBuzz] infinite loop in _hb_ot_shape_normalize() when var selector is present

2011-10-14 Thread Jonathan Kew
Hi Behdad, In the current hbng code, _hb_ot_shape_normalize() will hang if a variation selector is present, because decompose_multi_char_cluster gives up, does an early return, and fails to make any forward progress through the buffer. Suggested fix: ---

[HarfBuzz] build problem on windows with older MSVC

2011-10-17 Thread Jonathan Kew
Hi Behdad, It seems that there's a problem with the use of intrin.h in some versions of MSVC - apparently some older SDK versions are buggy and it leads to a conflict with windows.h. I ran into this when things built fine for me locally, with VC2010, but failed on our tinderbox machines with

Re: [HarfBuzz] Classic Mongolian in Firefox

2012-01-16 Thread Jonathan Kew
I've had a bug on file about updating harfbuzz in our tree for awhile now... https://bugzilla.mozilla.org/show_bug.cgi?id=695857. I'm about to post updated patches there, as we've had other code changes in the meantime that require some revision; then let's hope we can get it reviewed and

[HarfBuzz] Thai, revisited

2012-01-21 Thread Jonathan Kew
It turns out that some legacy Thai fonts provide OpenType substitution features to implement mark positioning, but (incorrectly) put those features/lookups under the 'latn' script tag instead of using 'thai' (or possibly 'DFLT'). See https://bugzilla.mozilla.org/show_bug.cgi?id=719366 for an

[HarfBuzz] thread-related warnings

2012-02-13 Thread Jonathan Kew
Hi Behdad, In our build (where we don't currently need to use harfbuzz across threads), we get warnings from hb-{mutex,object}-private.hh: /builds/harfbuzz-update/gfx/harfbuzz/src/hb-mutex-private.hh:69:2: warning: #warning Could not find any system to define platform macros, library will

Re: [HarfBuzz] (noob?) Building HB

2012-02-19 Thread Jonathan Kew
Looking at the Makefile.am in the utils directory, I see things like if HAVE_GLIB if HAVE_FREETYPE if HAVE_CAIRO_FT hb_view_SOURCES = \ ...etc... bin_PROGRAMS += hb-view endif endif endif which suggests that hb-view (for example) won't be built unless configure has found glib, freetype and

Re: [HarfBuzz] On hb_shape_plan() and other API for 1.0

2012-04-12 Thread Jonathan Kew
On 12/4/12 02:47, Behdad Esfahbod wrote: As a crude test, I profiled the Indic shaping, and am conjecturing that about 10 to 20 percent of the time can be saved pre-planning the shaping process. My testing showed no measurable saving for skipping the sanitizing process. Maybe both can wait (and

Re: [HarfBuzz] A problem in thai shaper

2012-04-18 Thread Jonathan Kew
On 18/4/12 02:22, Behdad Esfahbod wrote: On 04/17/2012 06:47 PM, Khaled Hosny wrote: On Tue, Apr 17, 2012 at 05:10:37AM +0200, Khaled Hosny wrote: On Mon, Apr 16, 2012 at 09:08:49PM -0400, Behdad Esfahbod wrote: Problem 2: When there is no consonant exist, the dotted circle should be

[HarfBuzz] compilation problem in hb-set-private.hh

2012-05-05 Thread Jonathan Kew
With current hbng master, I'm hitting a compilation failure with GCC 4.2.1, as it doesn't like the last STATIC_ASSERT here: CXXlibharfbuzz_la-hb-set.lo In file included from ../../src/hb-set.cc:27: ../../src/hb-set-private.hh:131: error: invalid use of non-static data member

Re: [HarfBuzz] harfbuzz-ng: Branch 'master' - 6 commits

2012-05-24 Thread Jonathan Kew
This commit: New commits: commit 22afd66a30d01b6771405e76777306f600807bea Author: Behdad Esfahbodbeh...@behdad.org Date: Thu May 17 21:23:49 2012 -0400 Add hb_atomic_int_set() again is slightly broken for the HB_NO_MT configuration... @@ -73,6 +75,7 @@ typedef volatile int

Re: [HarfBuzz] output font OT features (cli tool?)

2012-05-27 Thread Jonathan Kew
On 27/5/12 13:51, Behdad Esfahbod wrote: On 05/27/2012 08:49 AM, Rolf Langenhuijzen wrote: Hello, Is there a command line tool available (from http://cgit.freedesktop.org/harfbuzz/) or anything similar to output supported/implemented opentype features of a font? Right now there is one in

Re: [HarfBuzz] (hb-view) feature 'onum' needs non numeric character

2012-05-28 Thread Jonathan Kew
On 28/5/12 21:29, Rolf Langenhuijzen wrote: Maybe not the most important things, but because I'm testing with hb-view I just report what I come across… When I test a text like 1960 with the onum feature on, it keeps showing the default lining figures. If you replace the text with a non

Re: [HarfBuzz] Malayalam [was: Lemongrass HarfBuzz Hackfest, end of day 4]

2012-07-23 Thread Jonathan Kew
On 23/7/12 13:57, Behdad Esfahbod wrote: Also noticed that post-base 'LA' is not correctly rendered for 'സ്പ്ലേ'. This one is more interesting. And we differ from Uniscribe, and I see why. Jonathan, this is what's happening: Both Rachana and Raghu have 'half' lookups that subtitute C,H

Re: [HarfBuzz] dotted circle is not appearing for dependant vowel

2012-07-24 Thread Jonathan Kew
On 24/7/12 12:51, Shriramana Sharma wrote: On Tue, Jul 24, 2012 at 3:26 PM, Pravin Satpute psatp...@redhat.com wrote: I see the dotted circle is still not appearing with dependant vowels (U+093f), Is this intentionally? Might be since you are removing test cases generating dotted

Re: [HarfBuzz] Multiple substitution and mark positioning

2012-07-25 Thread Jonathan Kew
On 25/7/12 22:13, Khaled Hosny wrote: This only applies to the marks that result of multiple substitution i.e. in Amiri the middle lam of لله is substituted with lamshaddasmallalef, I don’t think Arabic Typesetting has something like that. Just wondering (without checking the code yet...) -

Re: [HarfBuzz] harfbuzz-ng: Branch 'master' - 12 commits

2012-07-29 Thread Jonathan Kew
On 27/7/12 17:56, Behdad Esfahbod wrote: @@ -114,6 +115,7 @@ hb_shape_plan_get_empty (void) static const hb_shape_plan_t _hb_shape_plan_nil = { HB_OBJECT_HEADER_STATIC, +TRUE, /* default_shaper_list */ NULL, /* face */ _HB_BUFFER_PROPS_DEFAULT, /* props */

Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)

2012-07-30 Thread Jonathan Kew
On 30/7/12 21:25, Rolf Langenhuijzen wrote: I tried installing the latest version. ./configure runs without problems. when I do make it stops: --- … CXXlibharfbuzz_la-hb-ot-layout.lo In file included from hb-ot-layout.cc:34: hb-ot-layout-gsub-table.hh: In member function ‘bool

Re: [HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)

2012-07-30 Thread Jonathan Kew
On 30/7/12 22:36, Rolf Langenhuijzen wrote: You are fast, indeed it helped! But then it goes wrong on some other part: Oh yes, the Core Text backend is currently broken, because Behdad has been re-working some of the internal interfaces. I'm currently just omitting it from the build by

Re: [HarfBuzz] harfbuzz 1.0

2012-08-21 Thread Jonathan Kew
On 7/8/12 00:13, Behdad Esfahbod wrote: [+harfbuzz list] Hi Matthias, Hope you enjoyed GUADEC. I sure missed the atmosphere, judging by PGO posts. Sure, lets do it. As of now, harfbuzz is in par os better than Pango in all aspects that I know. So, what I will do (some of it during my

Re: [HarfBuzz] Building for multiple archs on Mac OS X (-arch i386 -arch x86_64)

2012-08-28 Thread Jonathan Kew
On 28/8/12 07:56, Adam Twardoch (List) wrote: Behdad, I wonder if you could make the building process of HarfBuzz easier so that it builds on multiple architectures out of the box, without manual lipo tricks? When I try to do the standard thing on Mac OS X (using harfbuzz 0.9.3), which is run

Re: [HarfBuzz] The canonical ordering of hamza marks

2012-09-10 Thread Jonathan Kew
On 2/9/12 05:07, Khaled Hosny wrote: On Sat, Sep 01, 2012 at 06:40:40PM -0400, Behdad Esfahbod wrote: On 08/26/2012 07:15 PM, Khaled Hosny wrote: Hi Behdad, I just noticed that hamza above and below marks (U+0654, U+0655), are reordered after Arabic vowel marks because they have much higher

Re: [HarfBuzz] does graphite affect the c++ munging? Does -On?

2012-11-05 Thread Jonathan Kew
On 5/11/12 18:15, James Cloos wrote: [Background for the harfbuzz readers: hb fails to compile with icu 50_rc and gcc 4.7.2 with an inconsistancy between what icu provides for LEFontInstance::mapCharsToGlyphs() and that hb wants.] FYI, https://bugs.webkit.org/show_bug.cgi?id=101179 discusses

Re: [HarfBuzz] ICU vs Harfbuzz - new screenshot!

2012-11-13 Thread Jonathan Kew
On 12/11/12 19:26, Steven R. Loomis wrote: http://icu-project.org/~srl/tmp/ICUvsHarfbuzzComp.png (ICU, Harfbuzz, and then Diff) sample text is http://source.icu-project.org/repos/icu/icu/trunk/source/samples/layout/Sample.txt Could you please confirm what font is being used for the

Re: [HarfBuzz] ICU vs Harfbuzz - new screenshot!

2012-11-13 Thread Jonathan Kew
On 13/11/12 08:23, Steven R. Loomis wrote: Jonathan, Somnath: This is pure Code2000. I'll re run it with something else later. I was trying to simplify things as much as possible (one ascii + one arabic character was failing). Interesting - I don't see the same problems in the Sanskrit

Re: [HarfBuzz] Sinhala split matra

2012-11-13 Thread Jonathan Kew
On 13/11/12 18:15, Harshula wrote: 4) Commit 0736915b8ed789a209205fec762997af3a8af89c ([Indic] Decompose Sinhala split matras the way old HarfBuzz / Pango did) has a bug. The five fonts I test with do not render correctly now. I suspect no fonts render correctly with current TOT Harfbuzz.

Re: [HarfBuzz] unbreaking mixed-up khmer fonts

2012-11-19 Thread Jonathan Kew
On 19/11/12 15:02, Behdad Esfahbod wrote: On 12-11-19 07:58 AM, Jonathan Kew wrote: Hi Behdad, Hope you've had a good weekend - thanks for all the good work last week. One thing has come up: it seems we've broken things for some widely-used Khmer fonts. E.g. the font hanuman.ttf used

Re: [HarfBuzz] unbreaking mixed-up khmer fonts

2012-11-19 Thread Jonathan Kew
One thing has come up: it seems we've broken things for some widely-used Khmer fonts. E.g. the font hanuman.ttf used on http://khmer.rfa.org/. This font has a 'liga' feature, but nevertheless relies on going through the indic shaper; it duplicates many of its lookups from 'abvs', etc.,

Re: [HarfBuzz] unbreaking mixed-up khmer fonts

2012-11-19 Thread Jonathan Kew
On 19/11/12 21:35, Jonathan Kew wrote: I've put a test page at http://people.mozilla.org/~jkew/kh/test.html that renders the sequences ក្រុ ខេ គៀ with 100+ fonts from several sources. They're mostly different versions of KhmerOS fonts, but there are a few others as well. Some initial

Re: [HarfBuzz] unbreaking mixed-up khmer fonts

2012-11-20 Thread Jonathan Kew
On 20/11/12 17:06, Behdad Esfahbod wrote: On 12-11-20 10:22 AM, Jonathan Kew wrote: I'm becoming increasingly convinced we need to bite the bullet and reintroduce explicit Ra support for fonts that lack 'pref'. Sigh. Umm'k. Walking in this morning I was thinking that maybe checking

Re: [HarfBuzz] unbreaking mixed-up khmer fonts

2012-11-20 Thread Jonathan Kew
On 20/11/12 17:40, Jonathan Kew wrote: On 20/11/12 17:06, Behdad Esfahbod wrote: On 12-11-20 10:22 AM, Jonathan Kew wrote: I'm becoming increasingly convinced we need to bite the bullet and reintroduce explicit Ra support for fonts that lack 'pref'. Sigh. Umm'k. Walking in this morning I

Re: [HarfBuzz] unbreaking mixed-up khmer fonts

2012-11-20 Thread Jonathan Kew
On 20/11/12 18:42, Jonathan Kew wrote: On 20/11/12 17:40, Jonathan Kew wrote: On 20/11/12 17:06, Behdad Esfahbod wrote: On 12-11-20 10:22 AM, Jonathan Kew wrote: I'm becoming increasingly convinced we need to bite the bullet and reintroduce explicit Ra support for fonts that lack 'pref

Re: [HarfBuzz] Font introspection tool

2012-12-18 Thread Jonathan Kew
On 18/12/12 22:23, Behdad Esfahbod wrote: Hi Khaled Jonathan, Here's another idea. Now that HarfBuzz shaper is fairly complete, we've been adding lots of what I call introspection APIs. There's some more to add, but after we're done it would be possible to write a tool that takes a font and

Re: [HarfBuzz] collect_glyphs() API

2013-01-02 Thread Jonathan Kew
On 31/12/12 17:33, Jonathan Kew wrote: On 4/12/12 22:21, Behdad Esfahbod wrote: Hi Werner and Jonathan, Just wanted to follow up and bring the new hb_ot_layout_lookup_collect_glyphs() to your attention. The implementation of this API is complete as far as I'm concerned. HOWEVER, I've done

Re: [HarfBuzz] New release?

2013-01-02 Thread Jonathan Kew
On 2/1/13 21:45, Behdad Esfahbod wrote: On 13-01-02 05:20 AM, Khaled Hosny wrote: Hi Behdad, Any estimates for when next HarfBuzz will be released? (for integrating new XeTeX into TeX Live). Just ask! I'll roll one today. I'll see if I can fix the issues Jonathan reported first. FWIW,

[HarfBuzz] build fails due to setmode() in options.cc

2013-02-11 Thread Jonathan Kew
The current code in util/options.cc fails to build for me on OS X because of the two uses of setmode(file, _O_BINARY). It seems that I have a setmode function, so HAVE_SETMODE is true, but it's not actually the same thing as you were expecting on Win32.

Re: [HarfBuzz] build fails due to setmode() in options.cc

2013-02-11 Thread Jonathan Kew
for all of MSVC, mingw and cygwin, at least. On 02/11/2013 06:56 AM, Jonathan Kew wrote: The current code in util/options.cc fails to build for me on OS X because of the two uses of setmode(file, _O_BINARY). It seems that I have a setmode function, so HAVE_SETMODE is true, but it's

Re: [HarfBuzz] Disabling OT features for ranges

2013-02-19 Thread Jonathan Kew
On 19/2/13 14:40, Lóránt Pintér wrote: Hi, I'm trying to disable some OpenType features while shaping. I'm trying to shape VAV VAV and disable kerning for the first three characters. If I don't set any features, kerning is on for the whole string: OK, this is what I expect If I set

Re: [HarfBuzz] Ligatures and color changes

2013-02-19 Thread Jonathan Kew
On 19/2/13 22:34, Behdad Esfahbod wrote: Hi Lóránt, On 02/19/2013 12:20 PM, Lóránt Pintér wrote: Hi, I have a problem with half-colored ligatures, like (5) mfim in the image: Right. That's one of the harder issues of text rendering. I figured out two ways to do this, but neither is good

Re: [HarfBuzz] Ligatures and color changes

2013-02-20 Thread Jonathan Kew
On 19/2/13 23:35, Lóránt Pintér wrote: Using ZWNJ would be a great way of fixing it. And indeed it splits the ligature all right, but it also destroys the kerning. Here's a little test I did with HarfBuzz @ e0486fc1affd3796fb8f664e2e7fc208f1d2106c: (the font has an fi ligature, and has some

Re: [HarfBuzz] Ligatures and color changes

2013-02-20 Thread Jonathan Kew
, did we miss something here? It seems to me like the skippy_iter in PairPosFormat1::apply doesn't know what it's looking for... JK -- *Lóránt Pintér* Developer at Prezi http://prezi.com On Wednesday, February 20, 2013 at 10:26 AM, Jonathan Kew wrote: On 19/2/13 23:35, Lóránt Pintér wrote

[HarfBuzz] compiler warning: comparison between signed and unsigned

2013-02-25 Thread Jonathan Kew
Hi Behdad, Just a small nit: I've noticed that our logs show a lot of warning: comparison between signed and unsigned integer expressions messages while compiling harfbuzz, originating from the comparison in allocate_size. Would you mind adding a typecast (or perhaps making the parameter a

Re: [HarfBuzz] Corner case wrt to repeating Malayalam vowel sign OO

2013-02-28 Thread Jonathan Kew
On 28/2/13 01:09, Behdad Esfahbod wrote: On 13-02-27 05:41 PM, Cibu Johny (സിബു) wrote: When ​MALAYALAM ​ VOWEL SIGN OO is repeated after a consonant, third one is displayed separately with a dotted circle. It should have behaved like the second OO sign. Sample text: കോോോ ​If there is

Re: [HarfBuzz] Running harfbuzz test

2013-03-04 Thread Jonathan Kew
On 1/3/13 04:12, Arky wrote: Is it possible to run harfbuzz tests on gnu/Linux Ubuntu machine? Depends on which tests you are interested in running. Can you elaborate? I would like to run automated tests to check language support for specific languages. The use case for this

Re: [HarfBuzz] [Indic] Inspecting the font for consonant position with Free Sans

2013-03-06 Thread Jonathan Kew
On 6/3/13 19:19, Bobby de Vos wrote: On 2013-03-05 17:58, Behdad Esfahbod wrote: The problem is: Free Sans has both deva and dev2 tables. HarfBuzz correctly chooses dev2. Now, we then proceed to find the base. For that, we check whether Virama,RA matches the blwf feature. It doesn't. As

Re: [HarfBuzz] Fwd: Re: Support for Khojki in HarfBuzz

2013-03-19 Thread Jonathan Kew
On 19/3/13 07:51, Behdad Esfahbod wrote: Resending to HarfBuzz list, in case someone wants to give this a try. Original Message Subject: Re: Support for Khojki in HarfBuzz Date: Mon, 18 Mar 2013 16:16:31 -0700 From: Anshuman Pandey pan...@umich.edu To: Behdad Esfahbod

Re: [HarfBuzz] Question on lxnt/ex-sdl-freetype-harfbuzz

2013-04-10 Thread Jonathan Kew
On 10/4/13 08:47, Nicolas Rougier wrote: I tried to compile the ex-sdl-freetype-harfbuzz example and get: Assertion failed: (buffer-content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || (!buffer-len buffer-content_type == HB_BUFFER_CONTENT_TYPE_INVALID)), function hb_buffer_add_utf, file

Re: [HarfBuzz] U+1A55 TAI THAM MEDIAL RA Reordering in HarfBuzz?

2013-04-23 Thread Jonathan Kew
On 23/4/13 22:18, Ed Trager wrote: Hi, Behdad and List Members, In Firefox 20.0 on Mac OS X and in Firefox 18.0.2 on Ubuntu, I see that the five PREFIXED TAI THAM DEPENDENT VOWEL SIGNS U+1A6E, 1A6F, 1A70, 1A71, 1A72 are correctly reordered and the spacing/kerning after reordering is also

Re: [HarfBuzz] Fwd: ZWNJ is being ignored

2013-05-01 Thread Jonathan Kew
On 30/4/13 21:49, Behdad Esfahbod wrote: On 13-04-28 05:27 PM, Georg Duffner wrote: Hi, I posted this on the XeTeX list. Khaled meant it could have something to do with http://cgit.freedesktop.org/harfbuzz/commit/?id=607feb7cff0e50f8738d2e49ca463fc9d7d494de Recently I’ve changed the

Re: [HarfBuzz] Fwd: ZWNJ is being ignored

2013-05-01 Thread Jonathan Kew
On 1/5/13 13:57, Georg Duffner wrote: Am 2013-05-01 11:30, schrieb Jonathan Kew: Presumably, the way to handle this as a font developer is to explicitly handle the ZWNJ, by adding something like sub f' zwnj f by f; ahead of the existing rule. That should in effect block the ligature

Re: [HarfBuzz] Regression test Bengali (0.9.5 VS 0.9.14)

2013-05-06 Thread Jonathan Kew
On 6/5/13 09:58, datao zhang wrote: Hi all: After compare harfbuzz output (0.9.5 and 0.9.14), I find 5 main differences. It seems that some change are not expected. Please argue if you have different opinion. Please state exactly what font you're using, so that others can test and

Re: [HarfBuzz] Some (obsolete) khmer fonts not working (anymore) with harfbuzz

2013-05-13 Thread Jonathan Kew
On 13/5/13 10:58, Olivier Berten wrote: Well... any string with coeng for instance. The string I'm using is: ពុម្ពអក្សរខ្មែរ Here are the results of hb-view --shapers=old Kh-Svayrieng.ttf ពុម្ពអក្សរខ្មែរ hb-view --shapers=ot Kh-Svayrieng.ttf ពុម្ពអក្សរខ្មែរ OK, so the problem is triggered by

Re: [HarfBuzz] Better handling variation selectors

2013-06-14 Thread Jonathan Kew
On 14/6/13 00:06, Behdad Esfahbod wrote: Some progress, but there's more to do. From the commit I just pushed out: commit 79d1007a501fd63c0ba4d51038c513e6b8b94740 Author: Behdad Esfahbod beh...@behdad.org Date: Thu Jun 13 19:01:07 2013 -0400 If variation selector is not consumed by

[HarfBuzz] handling of variation selectors

2013-07-02 Thread Jonathan Kew
: Jonathan Kew j...@mozilla.com diff --git a/gfx/harfbuzz/src/hb-ot-shape-normalize.cc b/gfx/harfbuzz/src/hb-ot-shape-normalize.cc --- a/gfx/harfbuzz/src/hb-ot-shape-normalize.cc +++ b/gfx/harfbuzz/src/hb-ot-shape-normalize.cc @@ -218,21 +218,28 @@ handle_variation_selector_cluster (const

[HarfBuzz] [patch] leak in Core Text backend

2013-07-30 Thread Jonathan Kew
out of hand! Trivial patch attached. JK commit 18f86a7d957d83f845ab54003b7cf6e181669c72 Author: Jonathan Kew jfkth...@gmail.com Date: Tue Jul 30 13:09:53 2013 +0100 [CoreText] Don't leak the CTLine object (and everything that hangs off it) diff --git a/src/hb-coretext.cc b/src/hb

Re: [HarfBuzz] Kerning issue with Linux Libertine smallcaps

2013-08-04 Thread Jonathan Kew
(regardless of the order). Not sure if this is a font bug or HarfBuzz bug (just if the Uniscribe backednd supported user features…). Regards, Khaled On Sun, Aug 04, 2013 at 10:36:13AM +0100, Jonathan Kew wrote: Hi Khaled, Interestingly, it kerns as expected when using a somewhat older LinLibertine

Re: [HarfBuzz] Post Base Substitution fails with Malayalam repha

2013-09-13 Thread Jonathan Kew
Hi Suresh, Please specify the exact font (version? link?) being used, to ensure we can reliably reproduce the problem. Thanks. On 13/9/13 07:50, Suresh P wrote: Hi, It seems that the post base substitutions is not happening with Malayalam reph. The uukara ligature glyph (used traditional

Re: [HarfBuzz] I wonder why glyph 'uni0647' is not substituted with the one at 0xFEE9('uni06BE.fina') in Tahoma font

2013-09-17 Thread Jonathan Kew
It's not really clear to me what you're asking or expecting. There are several instances of U+0647 in your string looks like they should be one initial, two medial and one final. What exact version of harfbuzz and of tahoma is involved? The result I'm seeing here matches your MSWord

Re: [HarfBuzz] I wonder why glyph 'uni0647' is not substituted with the one at 0xFEE9('uni06BE.fina') in Tahoma font

2013-09-17 Thread Jonathan Kew
On 17/9/13 15:58, Su Scott wrote: Dear /Jonathan,/ / / OK, let me explain... My seeing is like output.png which I attached, If you compare output.png (wrong) with msword.png (correct) you'll see the 1st medial U+0647 should NOT be in the final form and the 2nd medial U+0647 should NOT be in the

[HarfBuzz] patch for apply_lookup (applying contextual lookups)

2013-09-28 Thread Jonathan Kew
Hi Behdad, I've been experimenting a bit with Noto Devanagari, and come up with the attached change to apply_lookup(). This fixes the problem where we were advancing too far during processing the contextual lookups for the first syllable, and hence missing the application of the same lookup

[HarfBuzz] syllable boundaries and indic features

2013-09-30 Thread Jonathan Kew
Another issue for us to look at in Paris... writing it up now so we don't forget. It looks to me like we may need to constrain Indic GSUB features to syllable boundaries more consistently (sadly). Failure to follow Uniscribe on this is leading to some poor results with NotoSansTelugu.

Re: [HarfBuzz] Thai shaping and dotted circle

2013-09-30 Thread Jonathan Kew
On 30/9/13 19:08, Behdad Esfahbod wrote: On 13-09-30 09:05 AM, Toresson, Alexander (EXT) wrote: Hello all, For for example Bengali, a dotted circle (U+25CC) is inserted before standalone combining marks. The same is not done for Thai, except for the first character in a paragraph/text (--bot

[HarfBuzz] 'kern' feature in Indic scripts

2013-09-30 Thread Jonathan Kew
In override_features_indic(), we currently disable 'kern' in uniscribe-compatible mode. However, at least for the Noto Telugu font on Win2012Server, I'm seeing that 'kern' *is* applied by Uniscribe. As a result, running tests with it disabled is leading to a lot of unwanted positioning

Re: [HarfBuzz] dll build

2013-10-01 Thread Jonathan Kew
On 1/10/13 19:26, Behdad Esfahbod wrote: On 13-10-01 08:03 AM, Eduardo Castineyra wrote: Hi, When I build hb as a dll, it does not export any symbol. I had to the project to add a .def file I stole from the hb-shape win32 compiled example. But I don't know what the proper way to get the

[HarfBuzz] tibetan marks

2013-10-20 Thread Jonathan Kew
Turns out that zeroing marks by GDEF in Tibetan (commit d5bd0590ae2fbc7b0dee86385a565aef00ffb835) has significantly regressed our numbers for the Windows himalaya.ttf font. :( The main problem seems to be the handling of 0F3C;TIBETAN MARK ANG KHANG GYON;Ps;0;ON;Y;TIBETAN LEFT BRACE

Re: [HarfBuzz] Clang warnings while compiling HB trunk

2013-10-22 Thread Jonathan Kew
On 22/10/13 00:20, Behdad Esfahbod wrote: On 13-10-20 01:44 PM, Shriramana Sharma wrote: Hello. I'm running Clang 3.2 on Kubuntu Saucy. Generally these warnings seem to be Ok. Not entirely. The warning about OT_CM2 here: hb-ot-shape-complex-indic.cc:166:27: warning: shift count = width of

[HarfBuzz] fallback kern optimization

2013-10-27 Thread Jonathan Kew
It's a relatively small thing, but we can get a slight win for the case where kerning has been disabled if we add an early return to _hb_ot_shape_fallback_kern(). Looks to me like we can also reduce the use of buffer-... there when kerning is being applied, which might help a bit (depending

[HarfBuzz] an optimization for complex fonts

2013-10-28 Thread Jonathan Kew
Hey Behdad, Turns out that for fonts such as Noto Devanagari and Gujarati, we're spending an inordinate amount of time under lookup.is_inplace (inplace_c) in apply_string(). We can get a big win for these fonts if we cache the is_inplace result in the lookup-accelerator, instead of

Re: [HarfBuzz] an optimization for complex fonts

2013-10-28 Thread Jonathan Kew
On 28/10/13 14:47, Behdad Esfahbod wrote: On 13-10-28 02:47 PM, Jonathan Kew wrote: See what you think. An alternative implementation might be to initialize the is_inplace flag during hb_ot_layout_lookup_accelerator_t::init() (then no need for the _initialized flag, hence taking an if() out

Re: [HarfBuzz] What is the utility of the advances list?

2013-10-29 Thread Jonathan Kew
read up about the OpenType layout process... http://www.microsoft.com/typography/SpecificationsOverview.mspx On Tue, 29 Oct 2013 10:40:59 +, Jonathan Kew wrote: On 29/10/13 10:19, eduardo wrote: Hi, Why does hb return a list of advances when, given a glyph, it can easily be extracted from

Re: [HarfBuzz] caching plans with user features

2013-10-30 Thread Jonathan Kew
tools would be redundant.) On Oct 29, 2013 10:10 PM, Jonathan Kew jfkth...@googlemail.com mailto:jfkth...@googlemail.com wrote: Hey Behdad, I figured out why the dashboard figures make it look as though we're surprisingly slow when running the XP fonts with simple scripts (e.g

[HarfBuzz] removing dead is_inplace code

2013-10-30 Thread Jonathan Kew
: Jonathan Kew jfkth...@gmail.com Date: Tue Oct 29 19:16:43 2013 + remove unused is_inplace methods and associated struct diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 103676b..5e4326e 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos

Re: [HarfBuzz] caching plans with user features

2013-10-31 Thread Jonathan Kew
On 29/10/13 23:03, Behdad Esfahbod wrote: On 13-10-29 10:10 PM, Jonathan Kew wrote: So I'd suggest it's worth doing something like this - unless of course you want to go the whole way and implement smart plan caching with user features, but IMO that sounds like it might be more effort than

Re: [HarfBuzz] Language-specific forms in Scheherazade [was: Fwd: Re: Questions regarding hb_language_t]

2013-12-16 Thread Jonathan Kew
On 16/12/13 15:44, Martin Hosken wrote: Dear Bob, On this subject: I would have expected language-specific forms to work with Graphite rendering since the language table therein appears to work (at least it does with WorldPad -- admittedly using the old Graphite engine): There was a bug

  1   2   >