Re: [HarfBuzz] Ligatures

2020-05-26 Thread Khaled Hosny
> On May 24, 2020, at 6:34 PM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sun, 24 May 2020 18:00:45 +0200 >> Cc: harfbuzz@lists.freedesktop.org >> > >> This, for example, ensures that HarfBuzz can do basic Arabic-like shaping >> acro

Re: [HarfBuzz] Ligatures

2020-05-24 Thread Khaled Hosny
> On May 24, 2020, at 5:41 PM, Eli Zaretskii wrote: > >>> I almost understand (and agree), sans one part: the "arbitrary parts" >>> of what you wrote. If we want to produce a ligature out of "ffi", the >>> shaper will get "fii" and nothing more. Which part here is arbitrary? >> >> Sending "

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Khaled Hosny
> On May 23, 2020, at 8:34 PM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sat, 23 May 2020 20:18:33 +0200 >> Cc: harfbuzz@lists.freedesktop.org >> >>> The Emacs display engine examines the text to be displayed and laid >>> out one

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Khaled Hosny
> On May 23, 2020, at 8:26 PM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sat, 23 May 2020 20:09:50 +0200 >> Cc: harfbuzz@lists.freedesktop.org >> >> Overall, if you can’t send the whole text (words are the absolute minimum, >> but thi

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Khaled Hosny
> On May 23, 2020, at 10:35 AM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sat, 23 May 2020 09:59:15 +0200 >> Cc: harfbuzz@lists.freedesktop.org >> >> Also either Emacs is currently treating text that it enables shaping for as >> second

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Khaled Hosny
> On May 23, 2020, at 10:25 AM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sat, 23 May 2020 09:51:21 +0200 >> Cc: harfbuzz@lists.freedesktop.org >> >>> Thanks. Since (b) is not really feasible without redesigning the >>> entire Ema

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Khaled Hosny
> On May 23, 2020, at 9:51 AM, Khaled Hosny wrote: > > > >> On May 23, 2020, at 9:44 AM, Eli Zaretskii wrote: >> >>> From: Khaled Hosny >>> Date: Sat, 23 May 2020 08:36:10 +0200 >>> Cc: harfbuzz@lists.freedesktop.org >>> >&g

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Khaled Hosny
> On May 23, 2020, at 9:44 AM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sat, 23 May 2020 08:36:10 +0200 >> Cc: harfbuzz@lists.freedesktop.org >> >>> The only way of >>> doing

Re: [HarfBuzz] Ligatures

2020-05-22 Thread Khaled Hosny
> On May 22, 2020, at 9:32 PM, Eli Zaretskii wrote: > > Hi, > > This is a bit off-topic, but I thought it could be appropriate to ask > here, since we have here some of the best experts on this subject. > > We are discussing support for ligatures in Emacs, specifically when > using HarfBuzz

Re: [HarfBuzz] Can't map characters to glyphInfos using clusters

2020-03-03 Thread Khaled Hosny
> On Mar 4, 2020, at 12:08 AM, bo samson wrote: > > Hi all, > When rendering each of my glyphs, I'd like to know if there are, for example, > linebreaks, so that I can skip them and go to the next line. (or at the very > least, skip that character) > > According to the documentation, I shou

Re: [HarfBuzz] Alternate/random glyphs

2020-02-13 Thread Khaled Hosny
> On Feb 12, 2020, at 9:28 PM, Aleš Mlakar wrote: > > Hi Khaled, > I did a quick debug through that part of HarfBuzz and it seems it's doing > lookups and never gets to the random code. What random code? > Tomorrow I'll try to put something together, would a link to a screen shot > and font

Re: [HarfBuzz] Alternate/random glyphs

2020-02-12 Thread Khaled Hosny
Depends on how the font is doing the randomization, using contextual lookups (most likely) or rand feature (less likely as this does not basically work outside of HarfBuzz and few other less common applications). We would need to see the font and specific examples with output of both to form an

Re: [HarfBuzz] Beginners question on unicode values

2020-02-04 Thread Khaled Hosny
Hi, > On Feb 4, 2020, at 10:29 AM, Patrick wrote: > > Hello all, > > (I am new to harfbuzz, I'd appreciate if you point me in the right direction) > > I use LuaTeX, which has a harfbuzz integration, so there might be > issues that are not related to harfbuzz. > > I load a font that comes with

Re: [HarfBuzz] The show must go on...

2020-01-09 Thread Khaled Hosny
Thanks Behdad for all the work you have done in HarfBuzz and for typography and internationalization of FOSS, and looking forward to seeing more of your work. I wish you the best with your life and new adventures. Thanks also to Ebrahim for all his work and looking after HarfBuzz and I wish him th

Re: [HarfBuzz] Exposing attachment tree / Arabic joining to shaping clients

2019-11-14 Thread Khaled Hosny
> Not sure how this can be explained, maybe someone has attempted to prevent > some fonts to get Kashida justification and maybe the detection was font > based, the reason it is still failing for IranNastaliq but not for Amiri, but > in any case it is imperfect. Amiri has a zero-width kashida

Re: [HarfBuzz] Closing down the list, 2019 edition

2019-08-19 Thread Khaled Hosny
> On Aug 19, 2019, at 7:58 PM, Behdad Esfahbod wrote: > > Hi all, > > I know I asked this before but... is there still value in keeping the list > around? I find myself preferring github issues over mailing list threads all > the time. > > I know our homepage / documentation / etc are lack

Re: [HarfBuzz] Display issue with DejaVu Sans Mono font

2019-08-18 Thread Khaled Hosny
> On Aug 18, 2019, at 4:40 AM, Eli Zaretskii wrote: > >> From: Khaled Hosny >> Date: Sun, 18 Aug 2019 00:48:14 +0200 >> Cc: Harfbuzz >> >>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-08/msg01082.html >>> >>> Is there som

Re: [HarfBuzz] Display issue with DejaVu Sans Mono font

2019-08-17 Thread Khaled Hosny
> On Aug 17, 2019, at 8:38 PM, Eli Zaretskii wrote: > > We have some strange display problem in Emacs with this sequence: > > u+0097 u+0301 u+0302 > > The problem seems to happen only with DejaVu Sans Mono font. It looks > like hb-view also displays the sequence with only one of the two > c

Re: [HarfBuzz] Use of bool and stdbool.h

2019-08-09 Thread Khaled Hosny
> On Aug 9, 2019, at 7:33 PM, Ebrahim Byagowi wrote: > > made we wonder why HarfBuzz went for hb_bool_t For C89 compatibility? Some not so old versions of MSVC didn’t have it either. ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://l

Re: [HarfBuzz] Failure in hb_font_get_nominal_glyph

2019-07-24 Thread Khaled Hosny
> On Jul 24, 2019, at 9:13 PM, Eli Zaretskii wrote: > >> From: Behdad Esfahbod >> Date: Wed, 24 Jul 2019 15:11:03 -0400 >> Cc: "harfbuzz@lists.freedesktop.org" >> >> Nothing stands out to me. > > Thanks for taking a look. > > Could something like that be caused by an old version of Freetyp

Re: [HarfBuzz] Order of combining diacriticals

2019-06-20 Thread Khaled Hosny
On Thu, Jun 20, 2019 at 6:35 PM Eli Zaretskii wrote: > > > From: Khaled Hosny > > Date: Thu, 20 Jun 2019 17:33:47 +0200 > > Cc: Behdad Esfahbod , Harfbuzz > > > > > > > >. For fonts that have no 'hebr' features, Emacs performs &g

Re: [HarfBuzz] Order of combining diacriticals

2019-06-20 Thread Khaled Hosny
On Fri, Jun 14, 2019 at 9:06 PM Eli Zaretskii wrote: > > > From: Behdad Esfahbod > > Date: Fri, 14 Jun 2019 11:34:17 -0700 > > Cc: Khaled Hosny , > > "harfbuzz@lists.freedesktop.org" > > > > On Thu, Jun 13, 2019 at 2:18 AM Eli Zaretskii

Re: [HarfBuzz] Order of combining diacriticals

2019-06-12 Thread Khaled Hosny
On Wed, Jun 12, 2019 at 10:22:48PM +0300, Eli Zaretskii wrote: > In Emacs, we use HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES cluster > level, because HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS produced > incorrect display. The cluster levels shouldn’t affect display, the glyph positions are exact

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-06 Thread Khaled Hosny
On Thu, Jun 06, 2019 at 05:29:07AM +0300, Eli Zaretskii wrote: > > From: Behdad Esfahbod > > Date: Wed, 5 Jun 2019 12:45:00 -0700 > > Cc: "harfbuzz@lists.freedesktop.org" > > > > HarfBuzz handles everything it understands. It was designed, in fact, such > > that when combined with > > FreeType

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-05-30 Thread Khaled Hosny
On Wed, May 29, 2019 at 10:32:12PM +0300, Eli Zaretskii wrote: > > No idea how Emacs would deal with reordered Indic glyphs which don’t > > always follow the input order. > > Can you show an example of such a situation and what is expected from > the correct shaping and display? I could then see

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-05-29 Thread Khaled Hosny
On Wed, May 29, 2019 at 06:30:08PM +0300, Eli Zaretskii wrote: > Hi, > > While testing the results of hb_shape_full called to shape R2L text, I > observed behavior that surprised me: shaping an R2L base letter with a > diacritical produces a sequence of glyphs in reverse order, i.e. the > glyph fo

Re: [HarfBuzz] How to get a glyph code for a character?

2019-05-25 Thread Khaled Hosny
On Sat, May 25, 2019 at 06:08:42PM +0300, Eli Zaretskii wrote: > > Date: Sat, 25 May 2019 15:50:38 +0100 > > From: Richard Wordingham > > > > I presume you're after the glyph indicated by the raw cmap, e.g. > > without localisation. > > Not sure what kind of localisation are you alluding to here

Re: [HarfBuzz] Why harfbuzz doesn't handle ligature carets itself?

2018-12-14 Thread Khaled Hosny
On Fri, Dec 14, 2018 at 07:00:43PM +0330, Ebrahim Byagowi wrote: > Hey there, just occurred to me this [hopefully not deeply incorrect] why > harfbuzz itself doesn't handle ligature carets, distributing the ligature > cluster advance with ignorable clusters followed by using GDEF/lcar info, > with

Re: [HarfBuzz] Cluster question (Was Cluster soap box time)

2018-12-14 Thread Khaled Hosny
On Thu, Dec 13, 2018 at 08:05:19PM -0800, Ansel Sermersheim wrote: > On 11/29/18 7:29 AM, Behdad Esfahbod wrote: > > > On Tue, Nov 27, 2018 at 8:34 PM Ansel Sermersheim > > wrote: > > > > On 11/19/2018 07:16 PM, Behdad Esfahbod wrote: > > > Hi Ansel, > > >

Re: [HarfBuzz] Clusters chapter

2018-11-02 Thread Khaled Hosny
On Fri, Nov 02, 2018 at 03:47:31PM -0500, Nathan Willis wrote: > Finally, I am adding a short "why your software cares about clusters" > paragraph to the beginning. I've got cursor positioning, coloring > diacritics, and line breaking in mind; anything else worth mentioning? In addition to what Be

Re: [HarfBuzz] [ARABIC] - 'hb_buffer_len' returning unexpected value after shaping

2018-10-31 Thread Khaled Hosny
On Wed, Oct 31, 2018 at 11:28:11AM +, Laurent CRUAU wrote: > Hello there, > > I am pretty new to harfbuzz but anyway I had not been into trouble for long > using arabic shaping until recently. > And now I am submitted something weird with very few Arabic strings (the vast > majority of them

Re: [HarfBuzz] hb_shape API failing for MAC default Indic MT and Sangam MN fonts

2018-10-11 Thread Khaled Hosny
On Thu, Oct 11, 2018 at 10:09:46AM +, Vijendra Singh wrote: > Hi All, > > I am using Harfbuzz 1.7.6 for Indic languages in my application but > failed to get correct result from hb_shape API for all MAC default > Indic MT and MN fonts like- Devanagari MT and Devanagari Sangam MN > fonts. Thes

Re: [HarfBuzz] query cvXX feature name table references

2018-04-30 Thread Khaled Hosny
On Mon, Apr 30, 2018 at 08:50:57PM +0700, Martin Hosken wrote: > Dear Behdad, > > Do you have any plans (pretty please) to add an API to enable a client > to query a font to get hold of the name table references for the > various cvXX features in a font? See https://github.com/harfbuzz/harfbuzz/p

Re: [HarfBuzz] unsafe to break

2017-11-11 Thread Khaled Hosny
On Sat, Nov 11, 2017 at 08:39:09AM +0700, Martin Hosken wrote: > Dear Behdad, > > Please could you explain the purpose and function of > HB_GLYPH_FLAG_UNSAFE_TO_BREAK. Is this about line breaking? grapheme > clustering? It is about shaping after line breaking. IIUC, unsafe to break means you must

Re: [HarfBuzz] Pre-base Vowel Following Cluster Used to be Rendered Afterwards

2017-07-12 Thread Khaled Hosny
On Tue, Jul 11, 2017 at 11:20:19PM +0100, 'Richard Wordingham' via Khaled Hosny wrote: > This bug (https://github.com/behdad/harfbuzz/issues/180) was fixed on > 17 December 2015. It was present in at least HarfBuzz Versions 1.0.1 > and 1.1.2, and was gone in Version 1.

Re: [HarfBuzz] Getting glyph information using Harfbuzz API

2017-05-24 Thread Khaled Hosny
On Wed, May 24, 2017 at 03:54:59PM -0700, Behdad Esfahbod wrote: > Hi Deepak, > > On Tue, May 23, 2017 at 8:45 PM, Deepak Jois wrote: > > > 3 I suppose if I have (1) above I can get a hb_glyph_extents_t for each > > glyph. I am not sure how to convert it to a value that makes sense to > > LuaTeX

Re: [HarfBuzz] Shape plan and user features

2016-12-17 Thread Khaled Hosny
On Sat, Dec 17, 2016 at 04:06:28PM -0600, Behdad Esfahbod wrote: > On Thu, Oct 20, 2016 at 4:04 AM, Khaled Hosny wrote: > > > It is not clear whether I should pass user features to > > hb_shape_plan_create_cached(), hb_shape_plan_execute() or both. If I > > pass them t

Re: [HarfBuzz] ICU and NMake build

2016-12-05 Thread Khaled Hosny
On Mon, Dec 05, 2016 at 03:15:04PM +, Elmar Braun wrote: > Hello, > > I've built HarfBuzz 1.3.3 with Visual Studio using the provided NMake build > files. I have two questions though: > > Building with "ICU=1" produces two DLLs: harfbuzz-vs14.dll, which, as far as > I can tell, uses ucdn for

Re: [HarfBuzz] Building hb-view

2016-11-10 Thread Khaled Hosny
On Thu, Nov 10, 2016 at 09:31:44PM +, Richard Wordingham wrote: > On Fri, 28 Oct 2016 20:29:54 +0200 > Khaled Hosny wrote: > > > Then please attach the full build log, may be someone can spot the > > issue. > > The command sequence in a new directory was:

Re: [HarfBuzz] Building hb-view

2016-10-28 Thread Khaled Hosny
On Fri, Oct 28, 2016 at 07:19:07PM +0100, Richard Wordingham wrote: > On Fri, 28 Oct 2016 19:23:56 +0200 > Khaled Hosny wrote: > > > On Fri, Oct 28, 2016 at 06:04:43PM +0100, Richard Wordingham wrote: > > > % CFLAGS=-g CXXFLAGS=-g ../configure > > > > You

Re: [HarfBuzz] Building hb-view

2016-10-28 Thread Khaled Hosny
On Fri, Oct 28, 2016 at 06:04:43PM +0100, Richard Wordingham wrote: > % CFLAGS=-g CXXFLAGS=-g ../configure You should get a summary at the end here, check if Cairo support is enabled as hb-view requires it. Regards, Khaled ___ HarfBuzz mailing list Harf

[HarfBuzz] Horizontal positions for vertical text?

2016-10-24 Thread Khaled Hosny
Hi, It seems that almost every HarfBuzz client doing vertical text that I checked will reverse the positions returned by HarfBuzz for vertical text to use them as if they were horizontal. May be we should have a buffer option to do this in HarfBuzz since it seems to be the most common use? (this i

[HarfBuzz] Fallback vertical shaping?

2016-10-24 Thread Khaled Hosny
Hi, I was looking into Firefox’s code to check how they handle vertical text (to see why they get better results for the same font than my code), and noticed that they try to use vertical presentation forms [1] when the font lacks ‘vert’ feature [2]. I was wondering if this is something HarfBuzz s

[HarfBuzz] Shape plan and user features

2016-10-20 Thread Khaled Hosny
It is not clear whether I should pass user features to hb_shape_plan_create_cached(), hb_shape_plan_execute() or both. If I pass them to the former but not the later features will be applied just fine, but if I do the reverse they will not, so when do I need to pass the features to hb_shape_plan_ex

Re: [HarfBuzz] parse_one_feature

2016-10-17 Thread Khaled Hosny
On Mon, Oct 17, 2016 at 01:31:18PM +0100, Martin Hosken wrote: > Dear Behdad, > > I notice that hb-shape has a parse_one_feature function, but that > nothing refers to it and it is not in the public API. Does this mean > that it is deprecated or that one day you will publicise it? Public API is h

Re: [HarfBuzz] Opentype features

2016-07-01 Thread Khaled Hosny
The same issue. On Fri, Jul 01, 2016 at 06:17:11PM -0400, Kelvin Ma wrote: > what about the segfault > > > On Fri, Jul 1, 2016 at 6:07 PM, Khaled Hosny wrote: > > > On Fri, Jul 01, 2016 at 03:02:45PM -0400, Kelvin Ma wrote: > > > so if this > > >

Re: [HarfBuzz] Opentype features

2016-07-01 Thread Khaled Hosny
On Fri, Jul 01, 2016 at 03:02:45PM -0400, Kelvin Ma wrote: > so if this > > isn’t lying then it looks like i gotta do > > otint = hb.tag_from_string(list(map(ord, 'onum'))) hb.tag_from_string(b'onum') > otfea

Re: [HarfBuzz] How to increase harfbuzz numerical precision

2016-06-28 Thread Khaled Hosny
t; loaded separately from harfbuzz’s fonts. So any value set on the harfbuzz > font is not known by the renderer > > On Tue, Jun 28, 2016 at 7:48 PM, Khaled Hosny wrote: > > > For device tables (as I said in my first reply) and I think hinting > > (though I don’t think hin

Re: [HarfBuzz] How to increase harfbuzz numerical precision

2016-06-28 Thread Khaled Hosny
e that harfbuzz just lets you read off of the > font (like upem, advance width, or glyph index) so you can do your own math > on the font outside of harfbuzz. > > On Tue, Jun 28, 2016 at 7:18 PM, Khaled Hosny wrote: > > > It is, but you have to set it separately, and then you

Re: [HarfBuzz] How to increase harfbuzz numerical precision

2016-06-28 Thread Khaled Hosny
2016 at 7:12 PM, Khaled Hosny wrote: > > > Device tables depend on ppem, so despite the scale being set > > on the font, you should still set the exact ppem. > > > > On Tue, Jun 28, 2016 at 06:43:58PM -0400, Kelvin Ma wrote: > > > so that’s the only way huh… >

Re: [HarfBuzz] How to increase harfbuzz numerical precision

2016-06-28 Thread Khaled Hosny
Device tables depend on ppem, so despite the scale being set on the font, you should still set the exact ppem. On Tue, Jun 28, 2016 at 06:43:58PM -0400, Kelvin Ma wrote: > so that’s the only way huh… > doesn’t that kind of defeat the purpose of hb.font_create() and having many > scaled versions of

Re: [HarfBuzz] How to increase harfbuzz numerical precision

2016-06-28 Thread Khaled Hosny
On Tue, Jun 28, 2016 at 06:40:32PM -0400, Kelvin Ma wrote: > > From: Simon Cozens > > To: harfbuzz@lists.freedesktop.org > > Subject: Re: [HarfBuzz] How to increase harfbuzz numerical precision > > Message-ID: > > Content-Type: text/plain; charset=utf-8 > > > > On 29/06/2016 06:57, Kelvin Ma wrot

Re: [HarfBuzz] font_get_h_extents & font_get_v_extents

2016-06-27 Thread Khaled Hosny
On Sun, Jun 26, 2016 at 11:11:11PM -0400, kelvinsthirt...@gmail.com wrote: > > > > On Jun 26, 2016, at 10:25 PM, Khaled Hosny wrote: > > > >> On Sun, Jun 26, 2016 at 10:05:15PM -0400, Kelvin Ma wrote: > >> How do you get the plain ascent and descent of a f

Re: [HarfBuzz] font_get_h_extents & font_get_v_extents

2016-06-26 Thread Khaled Hosny
On Sun, Jun 26, 2016 at 10:05:15PM -0400, Kelvin Ma wrote: > How do you get the plain ascent and descent of a font? font_get_h_extents() > gives the HHead values of the font, not the regular ascent and descent. There are three different settings for ascent and descent in OpenType fonts, which one

Re: [HarfBuzz] Setting initial cluster value

2016-06-25 Thread Khaled Hosny
On Sat, Jun 25, 2016 at 01:07:29PM -0400, Kelvin Ma wrote: > for the same reason kerning cannot happen between two different font runs, > how can arabic shaping happen across different font runs? Basic Arabic shaping involves textual analysis, this depends on Unicode character properties and neigh

Re: [HarfBuzz] Setting initial cluster value

2016-06-25 Thread Khaled Hosny
On Sat, Jun 25, 2016 at 01:06:27PM -0400, Kelvin Ma wrote: > > > > > Don’t you > > > > need > > > > > context to be ignored if the boundaries of the text you want to shape > > > > fall > > > > > inside a cluster? Like in the string 'af[fluency s]tate' where only > > the > > > > > 'fluency s' is sup

Re: [HarfBuzz] Setting initial cluster value

2016-06-25 Thread Khaled Hosny
On Sat, Jun 25, 2016 at 12:00:55PM -0400, Kelvin Ma wrote: > On Sat, Jun 25, 2016 at 8:57 AM, Khaled Hosny wrote: > > > On Fri, Jun 24, 2016 at 10:06:07PM -0400, Kelvin Ma wrote: > > > How do you set the initial cluster value? So that harfbuzz will start > > > cou

Re: [HarfBuzz] Setting initial cluster value

2016-06-25 Thread Khaled Hosny
On Fri, Jun 24, 2016 at 10:06:07PM -0400, Kelvin Ma wrote: > How do you set the initial cluster value? So that harfbuzz will start > counting from some number like 25 instead of 0. Use hb_buffer_add(), or just do 25 + cluster in your code. > Also wh

Re: [HarfBuzz] Travis build failure

2016-06-18 Thread Khaled Hosny
On Fri, Jun 17, 2016 at 03:34:38PM +0200, Khaled Hosny wrote: > It seems that use.tests have been failing on Travis for a while (which > makes all pull requests to fail as well). Behdad, do you have any idea > why it is failing? Turned out to be a case of a “narrow” Python build and the

[HarfBuzz] Travis build failure

2016-06-17 Thread Khaled Hosny
It seems that use.tests have been failing on Travis for a while (which makes all pull requests to fail as well). Behdad, do you have any idea why it is failing? Regards, Khaled ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://lists.freede

Re: [HarfBuzz] What is wrong with unicode in harfbuzz?

2016-06-16 Thread Khaled Hosny
On Thu, Jun 16, 2016 at 11:10:03PM -0400, Kelvin Ma wrote: > ok thanks!! && in that case yall best fix the example at > https://github.com/behdad/harfbuzz/blob/master/src/sample.py then because > it just uses string.encode('utf-x'). which is confusing. The example is fine, for UTF-8 the API expect

Re: [HarfBuzz] What is wrong with unicode in harfbuzz?

2016-06-16 Thread Khaled Hosny
On Thu, Jun 16, 2016 at 09:35:03PM -0400, Kelvin Ma wrote: > When I run a simple harfbuzz shaping like > > string = 'In begíffi our ' > > utfstring = string.encode('utf-8') > > > > buf = hb.buffer_create() > > hb.buffer_add_utf8(buf, utfstring, 0, -1) > > hb.buffer_guess_segment_properties(buf) >

Re: [HarfBuzz] Fwd: Harfbuzz with linebreaking

2016-06-15 Thread Khaled Hosny
On Wed, Jun 15, 2016 at 09:29:34AM +0700, Martin Hosken wrote: >I would suggest that you don't need to reshape if the start > of the next line is in a different cluster to the end of the previous > line. There are cases where you may need to do some positional tidying > (deciding where

Re: [HarfBuzz] Harfbuzz with linebreaking

2016-06-13 Thread Khaled Hosny
On Mon, Jun 13, 2016 at 11:00:16AM -0400, Kelvin Ma wrote: > So I’ve not received an answer to this anywhere, so, how do I typeset > paragraphs with Harfbuzz? How do I use the ‘safe-to-break’ iterator? How are you doing line breaking right now? Regards, Khaled

Re: [HarfBuzz] Windows build of harfbuzz with nmake

2016-06-13 Thread Khaled Hosny
On Mon, Jun 13, 2016 at 10:34:24AM +0100, John Emmas wrote: > On 13/06/2016 10:09, Juha Martikainen wrote: > > > > I had a second build attempt where I made my own vcxproj file. There I > > get the following kind of errors: > > > > 1>..\..\src\hb-directwrite.cc(246): error C2039: 'directwrite' :

Re: [HarfBuzz] Itemising Japanese scripts

2016-04-24 Thread Khaled Hosny
On Mon, Apr 25, 2016 at 08:18:14AM +1000, Simon Cozens wrote: > On 25/04/2016 08:05, Khaled Hosny wrote: > > The problem with merging is which script tag to select for the merged run, > > Kana or Hani or “it depends on the font”. > > Why does it matter what script tag to

Re: [HarfBuzz] Itemising Japanese scripts

2016-04-24 Thread Khaled Hosny
On Mon, Apr 25, 2016 at 07:41:39AM +1000, Simon Cozens wrote: > On 25/04/2016 07:22, Khaled Hosny wrote: > > This leaves Han which has its own OpenType tag and that is what I have > > been seeing most. So I wounder what other application do, should I try > > something clever

Re: [HarfBuzz] Itemising Japanese scripts

2016-04-24 Thread Khaled Hosny
On Sun, Apr 24, 2016 at 05:36:22PM +0200, Adam Twardoch (List) wrote: > I think they should always be merged. They were emcoded as three > scripts in Unicode in the early days when it was not at all obvious > how the script property is to be used. Certainly the notion of script > itemisation in Ope

Re: [HarfBuzz] Itemising Japanese scripts

2016-04-24 Thread Khaled Hosny
On Mon, Apr 25, 2016 at 12:46:21AM +0900, suzuki toshiya wrote: > Hi, > > I will try to contact with W3C JLREQ experts to ask some > recommended reference. Before it, I list a few points; > > * it is not rare to assign a font for Han character and > different font for kana (I'm unfamiliar with t

[HarfBuzz] Itemising Japanese scripts

2016-04-24 Thread Khaled Hosny
I’m wondering what is the best practice of itemising Japanese scripts (Han, Hiragana, Katakana), should they be merged somehow or is it better to keep them in separate runs? I’m currently treating them as separate scripts so they end up in operate runs, but in the ~7000 characters of Japanese text

Re: [HarfBuzz] have markfiltersets ever worked?

2016-04-04 Thread Khaled Hosny
On Mon, Apr 04, 2016 at 11:39:53PM +0200, Khaled Hosny wrote: > On Mon, Apr 04, 2016 at 02:31:59PM -0700, Behdad Esfahbod wrote: > > Khaled, what sequence can I use for testing? Want to add to the test suite. > > An of: > تختة تخنة تخئة تخثة تخٹة Using https://github.com/kh

Re: [HarfBuzz] have markfiltersets ever worked?

2016-04-04 Thread Khaled Hosny
On Mon, Apr 04, 2016 at 02:31:59PM -0700, Behdad Esfahbod wrote: > Khaled, what sequence can I use for testing? Want to add to the test suite. An of: تختة تخنة تخئة تخثة تخٹة Regards, Khaled ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http

Re: [HarfBuzz] Detecting mandatory ligatures

2016-04-04 Thread Khaled Hosny
On Mon, Apr 04, 2016 at 01:02:56PM -0700, Behdad Esfahbod wrote: > On Mon, Apr 4, 2016 at 12:45 PM, Khaled Hosny wrote: > > > On Tue, Mar 22, 2016 at 10:52:43PM +, Jamie Dale wrote: > > > Hey all, > > > > > > I've spent today fixing some

Re: [HarfBuzz] Detecting mandatory ligatures

2016-04-04 Thread Khaled Hosny
On Tue, Mar 22, 2016 at 10:52:43PM +, Jamie Dale wrote: > Hey all, > > I've spent today fixing some issues in our editable text controls, mostly > relating to issues caused by the difference between characters and grapheme > clusters. > > I've sorted most of my issues now, but I'm still havin

Re: [HarfBuzz] have markfiltersets ever worked?

2016-04-01 Thread Khaled Hosny
On Fri, Apr 01, 2016 at 10:30:43AM +0700, Martin Hosken wrote: > Dear All, > > Has anyone had any success with mark filter sets? It used to work in the past, but I tried it now and does not seem to work now. Regards, Khaled ___ HarfBuzz mailing list Ha

Re: [HarfBuzz] hb_ft_face_create_referenced and the hb_face_t is uninitialized

2016-03-19 Thread Khaled Hosny
On Fri, Mar 18, 2016 at 11:49:10AM -0400, Liam wrote: > Hello, > > I have a few questions about this method, I am looking to obtain the > table information to find the values for substitution tables so that I can > input the correct value for value when I create a hb_feature_t. > > I figured

Re: [HarfBuzz] Beginner question: What are cluster levels?

2016-01-08 Thread Khaled Hosny
On Fri, Jan 08, 2016 at 04:47:14PM +, Behdad Esfahbod wrote: > Now, if for example, B and C ligate, then the clusters to which they belong > "merge". The merged cluster gets the number that is the minimum of the > cluster number of the clusters that went in. In this case, we get: > > A,BC,

[HarfBuzz] Some questions for the documentation

2016-01-02 Thread Khaled Hosny
Hi, I’m trying to document all of buffer functions [1], and somethings are no very clear to me. * What is the purpose of hb_buffer_get_empty() and how is it different from hb_buffer_create()? * What is the implications of using different cluster levels? My understanding is that level 0 merge

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-28 Thread Khaled Hosny
That was because of the new HB_EXTERN decorator, fixed in: https://github.com/behdad/harfbuzz/pull/202 Regards, Khaled On Sat, Dec 26, 2015 at 03:25:29AM +0400, Khaled Hosny wrote: > I just noticed now that almost all functions are missing from the > generated documentation. When I run the

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-25 Thread Khaled Hosny
I just noticed now that almost all functions are missing from the generated documentation. When I run the build locally I see lots of: ./harfbuzz-sections.txt:422: warning: No declaration found for hb_feature_to_string. which would explain why they are missing from the docs, but I couldn’t ma

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-24 Thread Khaled Hosny
On Thu, Dec 24, 2015 at 12:50:42PM -0800, Jonathan Blow wrote: > Khaled wrote: > > > > > Each Unicode character has a script property, so you don’t need to hard > > code it for the text. The only complication is inherited or common > > characters, but there is a simple heuristic to handle them,

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Khaled Hosny
On Wed, Dec 23, 2015 at 07:03:25PM -0800, Jonathan Blow wrote: > The most frustrating thing about sending mail to a mailing list asking a > question is that everyone treats you like a junior programmer. > > > > > I am not able to conceive of any version of "render glyph" whose > > > implementatio

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Khaled Hosny
On Wed, Dec 23, 2015 at 03:20:10PM -0800, Jonathan Blow wrote: > > > > > > > > You don't need to look into bearings metrics if you want to render > > something. And no, they are not offsets. > > > > HB gives you advances and offset vectors. So what you need to do is: > > > > (origin) -> (render gly

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Khaled Hosny
On Wed, Dec 23, 2015 at 02:37:38PM -0800, Jonathan Blow wrote: > > > > > > > > FreeType does not give you any offsets. Unless you mean the side > > bearings, but they are very different things and shouldn’t be used for > > glyph placement at all. You are getting 0 offsets because either the > > fon

Re: [HarfBuzz] HarfBuzz glyph offsets

2015-12-23 Thread Khaled Hosny
On Wed, Dec 23, 2015 at 01:27:45PM -0800, Jonathan Blow wrote: > I am having a weird problem where I can render text with HarfBuzz and it is > generally doing the right thing in terms of shaping, but glyph offsets seem > to be coming out zero all the time, leading to general badness. > > Here's a

Re: [HarfBuzz] harfbuzz versus fribidi

2015-12-22 Thread Khaled Hosny
On Wed, Aug 26, 2015 at 11:27:40AM +0200, Eduardo Castineyra wrote: > On 8/25/2015 2:51 PM, Graham Douglas wrote: > >On 25/08/2015 13:26, Behdad Esfahbod wrote: > >>I should add API to FriBidi to align it better for use with HarfBuzz... > >Hi Behdad > > > >Yes, yes + yes --- that would be awesome :

Re: [HarfBuzz] HarfBuzz + SDL_ttf

2015-12-22 Thread Khaled Hosny
On Wed, Aug 19, 2015 at 12:01:48PM +0100, Behdad Esfahbod wrote: > Sylvain Becker wrote to me to point out that he has updated SDL_ttf to use > HarfBuzz: > > https://bugzilla.libsdl.org/show_bug.cgi?id=3046 > > Not sure exactly what the implications are, but I thought I share. Here is another

Re: [HarfBuzz] Small Caps

2015-12-13 Thread Khaled Hosny
On Sun, Dec 13, 2015 at 05:26:33PM +0900, Simon Cozens wrote: > On 13/12/2015 11:48, Daniel Ribeiro Maciel wrote: > > I read harfbuzz might support real small caps for OpenType fonts. Is > > this true? If so, would you please help me getting it to work? I have no > > clue how to do it. > > You wan

Re: [HarfBuzz] Question about zero width glyphs in shaping output

2015-12-08 Thread Khaled Hosny
On Mon, Dec 07, 2015 at 09:13:23PM +0530, Deepak Jois wrote: > Maybe this is a bit related to Khaled’s question earlier about control > characters inside ligatures, but I wanted to start a new thread. > > When I shape text with Noto Nastaliq, I notice a bunch of zero-width > glyphs generated > >

Re: [HarfBuzz] Control characters inside ligatures

2015-12-07 Thread Khaled Hosny
On Mon, Dec 07, 2015 at 09:14:19AM +0100, Behdad Esfahbod wrote: > On 15-12-05 03:31 PM, Khaled Hosny wrote: > > Hi, > > > > I just noticed that when there is a control character between character > > that form a ligature, there is a zero width space after the ligature

Re: [HarfBuzz] Some questions about scripts and languages

2015-12-05 Thread Khaled Hosny
On Sat, Dec 05, 2015 at 06:52:34PM +0400, Khaled Hosny wrote: > On Sat, Dec 05, 2015 at 04:52:13PM +0530, Deepak Jois wrote: > > I have a few questions about script and language handling in Harfbuzz APIs > > > > 1. It seems that hb_buffer_guess_segment_properties uses t

Re: [HarfBuzz] Some questions about scripts and languages

2015-12-05 Thread Khaled Hosny
On Sat, Dec 05, 2015 at 04:52:13PM +0530, Deepak Jois wrote: > I have a few questions about script and language handling in Harfbuzz APIs > > 1. It seems that hb_buffer_guess_segment_properties uses the LC_TYPE > as the language. In my case, for whatever reason it is reporting it as > ‘c’. If you

[HarfBuzz] Control characters inside ligatures

2015-12-05 Thread Khaled Hosny
Hi, I just noticed that when there is a control character between character that form a ligature, there is a zero width space after the ligature with a cluster value of the first character in the ligature, for example: $ hb-unicode-encode U+0066,U+200C,U+0069 | hb-shape amiri-regular.ttf [f_i=0+1

Re: [HarfBuzz] Handling OpenType layout across itemisation boundaries

2015-11-09 Thread Khaled Hosny
On Mon, Nov 09, 2015 at 09:11:28PM +, Jonathan Kew wrote: > On 9/11/15 18:31, Khaled Hosny wrote: > >While reading page 13 of John Hudson’s IUC39 presentation [1], I was > >wondering if HarfBuzz can handle script, language and direction > >properties the same way it hand

[HarfBuzz] Handling OpenType layout across itemisation boundaries

2015-11-09 Thread Khaled Hosny
While reading page 13 of John Hudson’s IUC39 presentation [1], I was wondering if HarfBuzz can handle script, language and direction properties the same way it handles optional features; i.e. instead of sending HarfBuzz buffers that has a single script, language and direction, one sends a single bu

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Khaled Hosny
On Mon, Oct 26, 2015 at 03:59:54PM +0100, Werner LEMBERG wrote: > > > I am not a typographer, I just play one on the Internet, so I am not > > sure what someone who was actually typesetting a book would do in > > that situation. My guess would be that they would, basically, do > > what SILE does

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Khaled Hosny
On Mon, Oct 26, 2015 at 05:30:20PM +0900, Simon Cozens wrote: > On 09/10/2015 15:09, Khaled Hosny wrote: > >> should just use the typographical ascender/descender of the font and hence > >> not > >> need glyph bounding boxes in Sile at all. > > > &g

Re: [HarfBuzz] Different results when shaping sub-sections of text

2015-10-10 Thread Khaled Hosny
On Wed, Oct 07, 2015 at 04:50:25PM +0300, Nikolay Sivov wrote: > I just tried that in LibreOffice Writer, and it seems like changing color in > Arabic string disables some advance adjustments, but overall shape is > intact. That's especially visible if you apply strikeout style to whole text > - th

Re: [HarfBuzz] Different results when shaping sub-sections of text

2015-10-10 Thread Khaled Hosny
highlighted part without playing any tricks, and there are Latin fonts that also handle f-ligatures by using contextual forms and no actual ligatures. Regards, Khaled > > -Jamie. > > On 6 October 2015 at 22:45, Khaled Hosny wrote: > > > On Tue, Oct 06, 2015 at 08:08:00PM +0

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-08 Thread Khaled Hosny
On Thu, Oct 08, 2015 at 11:54:09AM -0400, Behdad Esfahbod wrote: > So, from my > point of view, you should NOT use this for line height calculation. You > should just use the typographical ascender/descender of the font and hence not >

  1   2   3   4   >