[HarfBuzz] Building and testing HarfBuzz 2.3.0 on MinGW

2019-01-26 Thread Eli Zaretskii
I'm resending this after subscribing to the list, since my original message, send a month ago, only got an automated response that it's waiting for a moderator. (Does someone actually tend to the moderator's tasks of this list?) I've built HarfBuzz 2.3.0 on MS-Windows using mingw.org's MinGW

Re: [HarfBuzz] Building and testing HarfBuzz 2.3.0 on MinGW

2019-01-27 Thread Eli Zaretskii
> From: Ebrahim Byagowi > Date: Sun, 27 Jan 2019 01:02:01 +0330 > Cc: Harfbuzz > > 1) Agreed Btw, one other prerequisite for running the test suite is Python. I suggest that to be mentioned as well. In my case, Python was not on PATH, and most tests failed. > 2) Something feels wrong as we

Re: [HarfBuzz] Building and testing HarfBuzz 2.3.0 on MinGW

2019-02-08 Thread Eli Zaretskii
> From: Nathan Willis > Date: Mon, 4 Feb 2019 12:28:02 + > Cc: harfbuzz@lists.freedesktop.org > > On Sat, Jan 26, 2019 at 5:35 PM Eli Zaretskii wrote: > > > 1) It would be good to have some guidance in some README or in the > > HTML docs regar

Re: [HarfBuzz] Building and testing HarfBuzz 2.3.0 on MinGW

2019-02-08 Thread Eli Zaretskii
> From: Ebrahim Byagowi > Date: Fri, 8 Feb 2019 16:02:46 +0330 > Cc: Nathan Willis , Harfbuzz > > > > My conclusion was that ICU is not needed, but maybe it has some advantages, > > It will be a good idea if someone ships ICU anyway, they use their ICU (or > glib, which can provide unicode >

Re: [HarfBuzz] Building and testing HarfBuzz 2.3.0 on MinGW

2019-02-05 Thread Eli Zaretskii
> From: Nathan Willis > Date: Mon, 4 Feb 2019 12:28:02 + > Cc: harfbuzz@lists.freedesktop.org > > On Sat, Jan 26, 2019 at 5:35 PM Eli Zaretskii wrote: > > 1) It would be good to have some guidance in some README or in the > HTML docs regarding the optional depend

[HarfBuzz] Units of members of hb_glyph_position_t

2019-05-27 Thread Eli Zaretskii
I cannot figure out in what units are these values reported, or how to control those units (if they are under the client program's control). In particular, I get a huge value of x_advance for the letter U+05EA HEBREW LETTER TAV when it is followed by U+05BB HEBREW POINT QUBUTS. The value of

Re: [HarfBuzz] Units of members of hb_glyph_position_t

2019-05-27 Thread Eli Zaretskii
> Date: Mon, 27 May 2019 21:21:47 +0300 > From: Eli Zaretskii > > I cannot figure out in what units are these values reported, or how to > control those units (if they are under the client program's control). > In particular, I get a huge value of x_advance for the letter U+05

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

2019-05-25 Thread Eli Zaretskii
> 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. I must confess that I'm relatively ignorant about fonts, glyphs, and

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

2019-05-25 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Sat, 25 May 2019 11:01:31 -0400 > Cc: "harfbuzz@lists.freedesktop.org" > > What is the best way of providing such a method with HarfBuzz on > MS-Windows? One possibility is obviously to call hb_shape, but maybe > there's a simpler way for a single codepoint?

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

2019-05-25 Thread Eli Zaretskii
One of the methods an Emacs font-backend should provide is the encode_char method, which returns the glyph code of the selected font for a character given by its Unicode codepoint. For example, the XFT backend uses the XftCharIndex function for that purpose, and the Freetype backend uses

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

2019-05-25 Thread Eli Zaretskii
> Date: Sat, 25 May 2019 17:17:23 +0200 > From: Khaled Hosny > Cc: Richard Wordingham , > harfbuzz@lists.freedesktop.org > > On Sat, May 25, 2019 at 06:08:42PM +0300, Eli Zaretskii wrote: > > > Date: Sat, 25 May 2019 15:50:38 +0100 > > > From: Richar

Re: [HarfBuzz] Units of members of hb_glyph_position_t

2019-05-27 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Mon, 27 May 2019 21:21:10 -0400 > Cc: "harfbuzz@lists.freedesktop.org" > > control those units (if they are under the client program's control). > > They are controlled mainly using hb_font_set_scale(). What happens if hb_font_set_scale is not called? Is

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-06-02 Thread Eli Zaretskii
> Date: Sun, 2 Jun 2019 20:29:15 +0100 > From: Richard Wordingham > Cc: harfbuzz@lists.freedesktop.org > > On Sun, 02 Jun 2019 21:01:35 +0300 > Eli Zaretskii wrote: > > > The version of HarfBuzz I built on Windows and am using with Emacs has > > Graphite

Re: [HarfBuzz] Units of members of hb_glyph_position_t

2019-05-28 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Tue, 28 May 2019 15:03:48 -0400 > Cc: "harfbuzz@lists.freedesktop.org" > > > You pick what value you want to represent one pixel as. Say, you choose > 1024. Then if you want to > render at > > "16px" font size, you set scale to 16*1024. That's all. > >

Re: [HarfBuzz] Units of members of hb_glyph_position_t

2019-05-28 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Tue, 28 May 2019 14:46:45 -0400 > Cc: "harfbuzz@lists.freedesktop.org" > > You pick what value you want to represent one pixel as. Say, you choose > 1024. Then if you want to render at > "16px" font size, you set scale to 16*1024. That's all. And then the

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-05-30 Thread Eli Zaretskii
> Date: Thu, 30 May 2019 21:19:00 +0100 > From: Richard Wordingham > Cc: harfbuzz@lists.freedesktop.org > > > I don't see any reordering here (with HarfBuzz), but maybe it's > > because the only font I have that covers Myanmar is Code2000. > > That's probably the problem. I have Version 1.171

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-05 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Wed, 5 Jun 2019 12:07:36 -0700 > Cc: "harfbuzz@lists.freedesktop.org" > > In other words, I don't know of a legitimate way to filter out broken fonts > like code2000. If that's what you are > asking for. No, I wasn't asking about Code2000, I was asking a more

[HarfBuzz] Emacs now uses HarfBuzz

2019-06-07 Thread Eli Zaretskii
This is to let you know that the master branch of Emacs now uses HarfBuzz as its shaping engine. I would like to thank everyone here for your help in making this happen, whether by contributing code or by advice (or both). You may now wish to add Emacs to the list pf projects which use HarfBuzz.

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-07 Thread Eli Zaretskii
> Date: Fri, 7 Jun 2019 05:31:33 +0200 > From: Khaled Hosny > Cc: Behdad Esfahbod , harfbuzz@lists.freedesktop.org > > > > HarfBuzz handles everything it understands. It was designed, in fact, > > > such that when combined with > > > FreeType or other external font funcs implementation, it

[HarfBuzz] HarfBuzz shaping of R2L text

2019-05-29 Thread Eli Zaretskii
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 for the diacritical comes first, before the base letter. For example, if I

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-29 Thread Eli Zaretskii
> Cc: beh...@behdad.org, harfbuzz@lists.freedesktop.org > From: Jonathan Kew > Date: Sat, 11 May 2019 22:15:46 +0100 > > > Would wrapping in a blob the buffer returned by GetFontData be enough? > > If you use GetFontData to get the complete font as a single buffer (i.e. > pass zero for the

Re: [HarfBuzz] How to make sure an hb_font_t object is valid?

2019-05-30 Thread Eli Zaretskii
> From: Ebrahim Byagowi > Date: Thu, 30 May 2019 11:14:13 +0430 > Cc: "harfbuzz@lists.freedesktop.org" > > Oh hb_font_t, I am sorry, as far as I know they are always valid, I don't > know of a case that it can be invalid > other than having an invalid hb_face_t. Maybe others can help better on

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-05-30 Thread Eli Zaretskii
> Date: Thu, 30 May 2019 01:18:24 +0100 > From: Richard Wordingham > > On Wed, 29 May 2019 22:32:12 +0300 > Eli Zaretskii wrote: > > The attached files shows a rendering of KA, U+1A6E TAI THAM VOWEL SIGN E, U+1A63 TAI THAM VOWEL SIGN AA>; one > could equally wel

[HarfBuzz] How to make sure an hb_font_t object is valid?

2019-05-29 Thread Eli Zaretskii
Last time I asked a similar question, I was told to use hb_face_get_glyph_count. But eventually I need to know that an hb_font_t I create from the face is valid and can be used for shaping. What are the best practices for doing that? Or maybe the shaper will return 'false' when given an invalid

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-05-29 Thread Eli Zaretskii
> Date: Wed, 29 May 2019 21:18:48 +0200 > From: Khaled Hosny > Cc: harfbuzz@lists.freedesktop.org > > AFAIK, yes this is expected. Usually the glyph order shouldn’t matter, > one just draws them as they are ordered by HarfBuzz and for anything > that requires glyph to glyph to character mapping,

Re: [HarfBuzz] Units of members of hb_glyph_position_t

2019-05-28 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Mon, 27 May 2019 21:21:10 -0400 > Cc: "harfbuzz@lists.freedesktop.org" > > control those units (if they are under the client program's control). > > They are controlled mainly using hb_font_set_scale(). > > In particular, I get a huge value of x_advance for

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-06-02 Thread Eli Zaretskii
> Date: Sun, 2 Jun 2019 18:35:07 +0100 > From: Richard Wordingham > > It looks as though you will have to resort to Padauk for Windows 7 > Uniscribe shaping for Myanmar, and trust that you don't accidentally > pick up a Graphite shaper. With Emacs learning to shape text via HarfBuzz, Uniscribe

[HarfBuzz] Selecting fonts for HarfBuzz

2019-06-02 Thread Eli Zaretskii
When searching the system for suitable fonts, are there any considerations or features the client should prefer, or prefer not to have, besides preferring OTF/TTF fonts, to produce the best shaping via HarfBuzz? Thanks. ___ HarfBuzz mailing list

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-05 Thread Eli Zaretskii
> Date: Wed, 05 Jun 2019 05:36:11 +0300 > From: Eli Zaretskii > Cc: harfbuzz@lists.freedesktop.org > > > We assume fonts support shaping. Ie. we don't have a way to check for font > > suitability for correct shaping. > > I understand, thanks. I wasn't asking h

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-05 Thread Eli Zaretskii
> 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 or other external font funcs implementation, it even "handles" font >

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-06 Thread Eli Zaretskii
> Date: Thu, 6 Jun 2019 09:56:18 +0700 > From: Martin Hosken > > In case it is unclear, harfbuzz can quite happily handle any TTF or OTF > whether or not it is designed to be shaped with OpenType or not. So you only > need one code path and can simply pass any font to harfbuzz for shaping and

Re: [HarfBuzz] Selecting fonts for HarfBuzz

2019-06-06 Thread Eli Zaretskii
> Date: Thu, 6 Jun 2019 01:31:19 +0100 > From: Richard Wordingham > > On Wed, 05 Jun 2019 20:26:41 +0300 > Eli Zaretskii wrote: > > > To make the question perhaps more concrete: the current code considers > > a font to be a match for shaping with HarfBuzz

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-05-30 Thread Eli Zaretskii
> Date: Thu, 30 May 2019 19:48:34 +0100 > From: Richard Wordingham > > The reordering is that the order in the backing store is: > > > > but the ordering in the display, left to right, is: > > > > I'd be surprised if this caused much problem. I think the big issue is > related to the

Re: [HarfBuzz] HarfBuzz shaping of R2L text

2019-06-02 Thread Eli Zaretskii
> Date: Fri, 31 May 2019 08:54:50 +0300 > From: Eli Zaretskii > Cc: harfbuzz@lists.freedesktop.org > > > Date: Thu, 30 May 2019 21:19:00 +0100 > > From: Richard Wordingham > > Cc: harfbuzz@lists.freedesktop.org > > > > > I don't see any re

[HarfBuzz] Patches for building HarfBuzz with mingw.org's MinGW

2019-06-02 Thread Eli Zaretskii
Hi, I'd like to submit a few small patches that allow HarfBuzz to be built on Windows with mingw.org's MinGW toolchain. (And before you ask: the reason you don't see the problems I describe below in your MinGW builds is that you use MinGW64, which is a different flavor of MinGW.) The patches

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-24 Thread Eli Zaretskii
> From: Konstantin Ritt > Date: Fri, 24 May 2019 19:16:24 +0300 > Cc: Ebrahim Byagowi , Harfbuzz > > > hb_blob_t *my_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void > *user_data) > { > HDC hdc = (HDC)user_data; > SelectObject(hdc, hfont); > > char *buffer = NULL; >

Re: [HarfBuzz] Order of combining diacriticals

2019-06-14 Thread Eli Zaretskii
> 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 wrote: > >. For fonts that have no 'hebr' features, Emacs performs >

[HarfBuzz] Order of combining diacriticals

2019-06-12 Thread Eli Zaretskii
In Emacs, we use HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES cluster level, because HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS produced incorrect display. With this level, whenever I type a Hebrew base character with more than one diacritical, I need to type them in certain order, otherwise the

Re: [HarfBuzz] HB config

2019-06-19 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Tue, 18 Jun 2019 12:12:44 -0700 > Cc: "harfbuzz@lists.freedesktop.org" > > Hi Jonathan, Dominik, others, > > You might have noticed I spent last couple of months trimming down HarfBuzz > binary size. I put some notes > together in the repo: > >

Re: [HarfBuzz] Order of combining diacriticals

2019-06-20 Thread Eli Zaretskii
> 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 > > > substitution of known precomposed characters before it invokes the > > > shaping engine. In this case, it

Re: [HarfBuzz] Order of combining diacriticals

2019-06-20 Thread Eli Zaretskii
> From: Khaled Hosny > Date: Thu, 20 Jun 2019 22:09:24 +0200 > Cc: Behdad Esfahbod , Harfbuzz > > > I mean whether you are using HarfBuzz with FreeType font functions, > internal ones or something custom does not matter for fallback Hebrew > shaping. > > If you want to additionally use

[HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
Is it possible to create a hb_face_t without going through Freetype? If so, could someone please tell what that would entail? The tutorial only shows how to create hb_font_t using Freetype, and I found no other documentation related to this, except the functions' signatures. The implementations

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
> From: Jonathan Kew > Date: Sat, 11 May 2019 11:08:42 +0100 > > You can use hb_face_create_for_tables, passing it a function that can > retrieve font tables (as hb_blobs) when requested by harfbuzz. > > This is what Firefox does, to use harfbuzz with Windows or MacOS font > APIs; a starting

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
> Cc: beh...@behdad.org, harfbuzz@lists.freedesktop.org > From: Jonathan Kew > Date: Sat, 11 May 2019 22:15:46 +0100 > > > Would wrapping in a blob the buffer returned by GetFontData be enough? > > If you use GetFontData to get the complete font as a single buffer (i.e. > pass zero for the

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Sat, 11 May 2019 12:25:57 -0700 > Cc: Jonathan Kew , > "harfbuzz@lists.freedesktop.org" > > you can even implement Windows-backed font-funcs. Several projects > do that. Say, look at Qt maybe? I looked at XeTeX, but it goes the Freetype way. I'll look

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Sat, 11 May 2019 11:51:16 -0700 > Cc: Jonathan Kew , > "harfbuzz@lists.freedesktop.org" > > Not sure yet. What is a "font" for this purpose? Does it have to be > the full contents of a font file on disk? > > Yes. The font file. Maybe describe what

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Sat, 11 May 2019 11:26:29 -0700 > Cc: Jonathan Kew , > "harfbuzz@lists.freedesktop.org" > > Or just use hb_face_create() and hb_font_create(). Thanks, that's what I thought I needed to do to begin with. However, hb_face_create needs a 'blob' argument,

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-11 Thread Eli Zaretskii
> Cc: Behdad Esfahbod , > "harfbuzz@lists.freedesktop.org" > From: Jonathan Kew > Date: Sat, 11 May 2019 20:11:17 +0100 > > > Yes. The font file.  Maybe describe what you are trying to do? > > > > If you've got access to the font as a file or as a single buffer in > memory, then wrapping

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-24 Thread Eli Zaretskii
Ping! Could someone please help me understand how the memory for the various HarfBuzz objects should be handled? Or point me to the documentation where that is described, if I missed it? Please?? > Date: Sat, 18 May 2019 14:33:45 +0300 > From: Eli Zaretskii > Cc:

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-24 Thread Eli Zaretskii
> From: Ebrahim Byagowi > Date: Fri, 24 May 2019 20:13:43 +0430 > Cc: Harfbuzz > > Pardon me for the may inaccurate following answer I have to write quickly, Thanks for your help. > > Also, does HarfBuzz support TrueType Collection (TTC) files, and if so, > > does it want the data only for

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-18 Thread Eli Zaretskii
> Cc: beh...@behdad.org, harfbuzz@lists.freedesktop.org > From: Jonathan Kew > Date: Sat, 11 May 2019 22:15:46 +0100 > > >> If you've got access to the font as a file or as a single buffer in > >> memory, then wrapping the entire thing as a blob and handing it to > >> hb_face_create will be

Re: [HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

2019-05-18 Thread Eli Zaretskii
> Date: Sat, 11 May 2019 22:44:49 +0300 > From: Eli Zaretskii > Cc: harfbuzz@lists.freedesktop.org > > > From: Behdad Esfahbod > > Date: Sat, 11 May 2019 12:25:57 -0700 > > Cc: Jonathan Kew , > > "harfbuzz@lists.freedesktop.org" > >

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

2019-08-19 Thread Eli Zaretskii
> From: Khaled Hosny > Date: Mon, 19 Aug 2019 01:05:51 +0200 > Cc: Harfbuzz > > > So this is indeed some problem with that particular font? > > It is partly a font issue (missing anchors and combining marks default > position to the left of base glyph), and partly HarfBuzz design decision of

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

2019-08-17 Thread Eli Zaretskii
> 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 something wrong with this font when displaying this sequence, > > or is there some kind of bug in Emacs and/or HarfBuzz? >

[HarfBuzz] Support for Stylistic Sets

2019-09-14 Thread Eli Zaretskii
Hi, AFAIU, HarfBuzz does support Stylistic Sets, but it is not clear to me what should an application do to request glyphs corresponding to a certain stylistic set. Suppose an application wants to display a text string using a specific stylistic set -- could someone please outline the sequence

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-14 Thread Eli Zaretskii
> From: Nikolay Sivov > Date: Sat, 14 Sep 2019 17:00:53 +0300 > Cc: Harfbuzz > > AFAIU, HarfBuzz does support Stylistic Sets, but it is not clear to me > what should an application do to request glyphs corresponding to a > certain stylistic set. > > Suppose an application wants to display

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-14 Thread Eli Zaretskii
> Date: Sat, 14 Sep 2019 21:33:00 +0100 > From: Richard Wordingham > Cc: harfbuzz@lists.freedesktop.org > > On Sat, 14 Sep 2019 21:15:04 +0300 > Eli Zaretskii wrote: > > > > Date: Sat, 14 Sep 2019 18:13:25 +0100 > > > From: Richard Wordingham > >

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-14 Thread Eli Zaretskii
> Date: Sat, 14 Sep 2019 18:13:25 +0100 > From: Richard Wordingham > > I think it's safe to specify the use of unsupported features, in which > case this is a luxury feature. you mean, specifying an unsupported feature will not cause hb_shape to fail, but instead just use the nominal glyphs? >

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-15 Thread Eli Zaretskii
> Date: Sun, 15 Sep 2019 12:37:25 +0100 > From: Richard Wordingham > > > > > Does HarfBuzz guess the language? > > > > > > Yes. > > It seems to use the current locale. That will usually be wrong for > cuneiform, and generally be wrong for multilingual text. But Emacs currently doesn't know

Re: [HarfBuzz] Support for Stylistic Sets

2019-09-15 Thread Eli Zaretskii
> From: Nikolay Sivov > Date: Sun, 15 Sep 2019 10:03:01 +0300 > Cc: Richard Wordingham , > Harfbuzz > > > Essentially yes, i.e. unsupported features will simply be ignored. > > Then there's no need to know whether a feature is supported. Thanks. > > MS Word for example shows a

[HarfBuzz] Failure in hb_font_get_nominal_glyph

2019-07-23 Thread Eli Zaretskii
Could someone please take a look at the problems described here: https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00540.html https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00557.html https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00558.html

Re: [HarfBuzz] Failure in hb_font_get_nominal_glyph

2019-07-25 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Wed, 24 Jul 2019 15:21:15 -0400 > Cc: Eli Zaretskii , > "harfbuzz@lists.freedesktop.org" > > Ah, right. Yes. Before 2.0.0 you'd have to call hb_ot_font_set_funcs() > explicitly... > > Thanks Khaled! Thanks. Just

Re: [HarfBuzz] Failure in hb_font_get_nominal_glyph

2019-07-25 Thread Eli Zaretskii
> From: Behdad Esfahbod > Date: Thu, 25 Jul 2019 12:08:43 -0400 > Cc: Khaled Hosny , harfbuzz@lists.freedesktop.org > > Looks good to me. Thanks! ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> From: Khaled Hosny > Date: Sat, 23 May 2020 08:36:10 +0200 > Cc: harfbuzz@lists.freedesktop.org > > >The only way of > > doing this right, I'm told, is to either (a) query the font to get the > > list of all the ligatures it supports, or

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> 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-class citizens where limitations/degraded performance is acceptable > (which is really really bad) Could

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> Date: Fri, 22 May 2020 22:22:49 +0100 > From: Richard Wordingham > > > The current support for producing ligatures works in the same way as > > complex text shaping for scripts that require that, like Arabic and > > Khmer: the sequences of characters that can be displayed as ligatures > > are

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> 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 Emacs display engine (for which I see no volunteers lining up > > any time soon), I guess we will have to use some

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> Date: Sat, 23 May 2020 14:51:53 +0100 > From: Richard Wordingham > > > > They may of course have more than one set of such rules, with the > > > rule sets defining different sets of sequences. > > > > Who are "they" in this context? > > Devanagari and Tai Tham are two examples I am aware

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> Date: Sat, 23 May 2020 16:54:51 +0100 > From: Richard Wordingham > Cc: harfbuzz@lists.freedesktop.org > > > Emacs supports more than one rule for each composable sequence of > > characters. > > That doesn't help when the rules give conflicting divisions into > clusters, which is the case with

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> From: Khaled Hosny > Date: Sat, 23 May 2020 20:40:44 +0200 > Cc: harfbuzz@lists.freedesktop.org > > Sending “ffi” alone is an arbitrary decision. The font might have kerning > between “ffi” and what comes before and after it, but you won’t get it. The > font might not hav a ligature for

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> 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 this has its issues as well), don’t just send arbitrary parts of it as > the result will be some inconsistent

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> 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 character at a time, and makes layout decisions after each > > character or grapheme cluster it lays out. Its

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> Cc: harfbuzz@lists.freedesktop.org > From: Simon Cozens > Date: Sat, 23 May 2020 20:14:16 +0100 > > On 23/05/2020 08:44, Eli Zaretskii wrote: > > Thanks. Since (b) is not really feasible without redesigning the > > entire Emacs display engine (for which I see no v

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> Date: Sat, 23 May 2020 20:06:32 +0100 > From: Richard Wordingham > > There are three different tools for producing what looks like an "ffi" > ligature: > > 1) Make a ligature > 2) Contextual substitution > 3) A mix of contextual substitution and kerning. > > A font that uses the first will

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> Date: Sat, 23 May 2020 16:33:12 +0100 > From: Richard Wordingham > > On Sat, 23 May 2020 11:25:38 +0300 > Eli Zaretskii wrote: > > > > From: Khaled Hosny > > > Date: Sat, 23 May 2020 09:51:21 +0200 > > > Cc: harfbuzz@lists.freedesktop.org

Re: [HarfBuzz] Ligatures

2020-05-23 Thread Eli Zaretskii
> From: Khaled Hosny > Date: Sat, 23 May 2020 20:54:15 +0200 > Cc: harfbuzz@lists.freedesktop.org > > > We pass to the shaper the part of text that matches the regexps you > > can see at the end of misc-lang.el, then display the glyphs the shaper > > returns. The above description is a

Re: [HarfBuzz] Ligatures

2020-05-24 Thread Eli Zaretskii
> Date: Sat, 23 May 2020 21:42:24 +0100 > From: Richard Wordingham > > > As for different scripts: if the character codepoints are the same, > > Emacs currently assigns each character to a single script. > > I'll need to dig deeper. Composition of both 'a' and Greek alpha with > an acute

Re: [HarfBuzz] Ligatures

2020-05-24 Thread Eli Zaretskii
> > 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 "ffi" alone is an arbitrary decision. The font might have

[HarfBuzz] Rendering of Arabic shadda-kasrah

2020-08-19 Thread Eli Zaretskii
Could someone please look at the discussion and the data of the Emacs bug#34035 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34035) and tell whether the fonts that produce incorrect display are faulty, and if so, what is the problem with those fonts? Also, is there perhaps some way around these

Re: [HarfBuzz] Ligatures

2020-05-25 Thread Eli Zaretskii
> Date: Sun, 24 May 2020 20:27:26 +0100 > From: Richard Wordingham > Cc: harfbuzz@lists.freedesktop.org > > It seems to me that Emacs knows what script a cluster is in; perhaps > it just hasn't united the concepts. It's a kind of coincidence: different scripts almost always require different

Re: [HarfBuzz] Ligatures

2020-05-24 Thread Eli Zaretskii
> From: Khaled Hosny > Date: Sun, 24 May 2020 18:00:45 +0200 > Cc: harfbuzz@lists.freedesktop.org > > In general the safest is to pass the whole paragraph of text and the start > and length of each item (item being a run with same font, direction, script, > and language). I was talking about

[HarfBuzz] Ligatures

2020-05-22 Thread Eli Zaretskii
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 as the shaping engine. See the discussion from

Re: [HarfBuzz] vertical text for RTL scripts?

2020-07-13 Thread Eli Zaretskii
> Cc: harfbuzz@lists.freedesktop.org > From: Phil M Perry > Date: Mon, 13 Jul 2020 11:11:51 -0400 > > Eli, I realize that (except for Chinese, Japanese, and possibly Korean), > text is normally written horizontally (LTR or RTL). Vertical text is for > special uses such as signage and

[HarfBuzz] HarfBuzz crash when shaping Arabic?

2020-07-14 Thread Eli Zaretskii
Could someone please look at this Emacs bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42352 and tell if something like this rings a bell? According to the backtrace, the crash happened inside HarfBuzz (the backtrace levels above that are the Emacs signal handling mechanism). The

Re: [HarfBuzz] vertical text for RTL scripts?

2020-07-15 Thread Eli Zaretskii
> From: Phil M Perry > Date: Wed, 15 Jul 2020 12:38:49 -0400 > > my TTBHebrew example in HarfBuzz.pdf (did anyone look at it?) I did. ___ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Re: [HarfBuzz] vertical text for RTL scripts?

2020-07-12 Thread Eli Zaretskii
> From: Phil M Perry > Date: Sun, 12 Jul 2020 10:15:31 -0400 > > Now, if I specify TTB direction, what should I see? Likewise, what > should BTT direction show? I know very little about RTL/bidi scripts, > and googling for examples gives ambiguous and conflicting information. I > realize that