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

2016-01-08 Thread Behdad Esfahbod
On Jan 8, 2016 8:09 PM, "Khaled Hosny" wrote: > > 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 c

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,

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

2016-01-08 Thread Behdad Esfahbod
Ok, let me attack this head on. Hopefully someone will lift the information here and put it in the documentation. When you add text to a HB buffer, each character is associated a cluster value. This is an arbitrary number as far as HB is concerned. Most clients will use UTF-8, UTF-16, or UTF-32

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

2016-01-06 Thread Jamie Dale
Yeah, I actually found that out myself as I'd added an assert that the number of characters was never zero... and then I pasted in some Arabic and it fired due to what you mentioned (multiple glyphs in a sequence with the same cluster index). I'm not too concerned by this though, as it's my unders

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

2016-01-06 Thread Graham Douglas
On 06/01/2016 14:37, Jonathan Kew wrote: > On 6/1/16 14:17, Behdad Esfahbod wrote: >> On 16-01-05 09:17 PM, Jamie Dale wrote: >>> I actually just wrote something to give me very similar information >>> since I >>> realised that my basic "this is a ligature" flag wasn't enough data, >>> so each >>>

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

2016-01-06 Thread Jonathan Kew
On 6/1/16 14:17, Behdad Esfahbod wrote: On 16-01-05 09:17 PM, Jamie Dale wrote: I actually just wrote something to give me very similar information since I realised that my basic "this is a ligature" flag wasn't enough data, so each of my glyphs now contains the number of characters that the gly

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

2016-01-06 Thread Behdad Esfahbod
On 16-01-05 09:17 PM, Jamie Dale wrote: > I actually just wrote something to give me very similar information since I > realised that my basic "this is a ligature" flag wasn't enough data, so each > of my glyphs now contains the number of characters that the glyph was composed > from. This, along w

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

2016-01-05 Thread Jamie Dale
I actually just wrote something to give me very similar information since I realised that my basic "this is a ligature" flag wasn't enough data, so each of my glyphs now contains the number of characters that the glyph was composed from. This, along with the cluster index of the glyph from the sour

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

2016-01-05 Thread Graham Douglas
On 04/01/2016 17:06, Behdad Esfahbod wrote: > Hi Jamie and Deepak, > > I'll try to get a detailed reply to this thread tomorrow. > > Cheers, > behdad > > > ___ > HarfBuzz mailing list > HarfBuzz@lists.freedesktop.org > http://lists.freedesktop.org/mailma

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

2016-01-05 Thread Jamie Dale
Thanks, I also have another question related to what I mentioned yesterday: Is there a reliable way to detect which glyphs are ligatures? My current solution checks for gaps in the cluster indices of the shaped glyph infos, but that also requires some special case handling to detect if the last gl

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

2016-01-04 Thread Behdad Esfahbod
Hi Jamie and Deepak, I'll try to get a detailed reply to this thread tomorrow. Cheers, behdad On 16-01-04 05:02 PM, Jamie Dale wrote: > I'm also curious to know the answer to this. I'm currently using > HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS as I read somewhere that it > produces finer grai

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

2016-01-04 Thread Jamie Dale
I'm also curious to know the answer to this. I'm currently using HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS as I read somewhere that it produces finer grained cluster data. I'm currently adding the remaining bits of editable text support that I'd skipped over before, and part of this is dealing w

[HarfBuzz] Beginner question: What are cluster levels?

2015-12-31 Thread Deepak Jois
In an off-list discussion with Khaled Hosny regarding a specific case of shaping text with Harfbuzz, he suggested setting cluster levels to a certain value to improve handling of values returned by Harfbuzz. I can see that the code has three possible values for cluster levels: * HB_BUFFER_CLUSTE