Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Behdad Esfahbod
On 15-10-26 08:41 AM, Werner LEMBERG wrote: >>> Knuth knew *very well* what he was doing, and the TeX typesetting >>> >> model works just fine for almost all cases, even more than 30 years >>> >> later. >> > >> > That is such a big claim, judging by the amount of people strugling with >> > TeX

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Simon Cozens
On 27/10/2015 00:37, Nikolay Sivov wrote: > But probably more important is that this functionality doesn't seem > to belong to harfbuzz in a first place, as it never needs global > metrics internally (or does it?). No, it doesn't need these metrics internally. If Harfbuzz just sticks to text

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Martin Hosken
Dear Simon, > In InDesign, both (1) and (2) get 12 x 1.2 = 14.4pt interline space. > This means that the descender of the "p" in "ipsum" will bump into > letters on the next line. That's clearly wrong. > > In the CSS model, both (1) and (2) get half leading added to the top and > the bottom of

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Jonathan Kew
On 26/10/15 15:37, Nikolay Sivov wrote: On 26.10.2015 11:30, 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. Yes please, an approach similar to what browsers

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Nikolay Sivov
On 26.10.2015 11:30, 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. Yes please, an approach similar to what browsers do would be much appreciated. OK; I've

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-26 Thread Werner LEMBERG
>> Knuth knew *very well* what he was doing, and the TeX typesetting >> model works just fine for almost all cases, even more than 30 years >> later. > > That is such a big claim, judging by the amount of people strugling with > TeX line spacing on tex.stackexchange.com: >

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. > > > > Yes please, an approach similar to what

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 John Labovitz
On Oct 26, 2015, at 4:30 AM, Simon Cozens 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. I’ve been a typographer/typesetter for 30 years, working in both

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-11 Thread Behdad Esfahbod
On 15-10-09 12:33 PM, Jonathan Kew wrote: > > You probably want to be using the "typographic" metrics from the OS/2 table, > if present, with the hhea metrics as a fallback for fonts that don't have > OS/2. (They're rare, but can exist at least on OS X.) Jonathan, Can you please point me out to

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-09 Thread Simon Cozens
On 10/10/2015 01:33, Jonathan Kew wrote: > You probably want to be using the "typographic" metrics from the OS/2 > table, if present, with the hhea metrics as a fallback for fonts that > don't have OS/2. (They're rare, but can exist at least on OS X.) Hmm... that's something it doesn't look like

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-09 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 >

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-09 Thread Jonathan Kew
On 9/10/15 14:32, Simon Cozens wrote: On 09/10/2015 15:09, Khaled Hosny wrote: 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

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-09 Thread Simon Cozens
On 09/10/2015 15:09, Khaled Hosny wrote: > 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

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-08 Thread Behdad Esfahbod
On 15-10-05 07:35 PM, Simon Cozens wrote: > On 03/10/2015 01:51, Behdad Esfahbod wrote: >> So, how does that sound? I expect that it will only make easier for most >> clients. Like to hear what Jonathan has to say. Chrome, Android, Pango, >> XeTeX, Sile should all either benefit from this or be

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-05 Thread Simon Cozens
On 03/10/2015 01:51, Behdad Esfahbod wrote: > So, how does that sound? I expect that it will only make easier for most > clients. Like to hear what Jonathan has to say. Chrome, Android, Pango, > XeTeX, Sile should all either benefit from this or be unaffected. This all sounds great but if it's

[HarfBuzz] Streamlining hb_font_t some more

2015-10-02 Thread Behdad Esfahbod
Hi, So, with the default scale set to upem, I'm now planning to make the following changes: - Make all fonts have a parent; for fonts created with hb_font_create(), they will default to the hb_font_get_empty() font as their parent. This changes the return value of hb_font_get_parent() for

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-02 Thread Konstantin Ritt
Sounds just great! 2015-10-02 19:51 GMT+03:00 Behdad Esfahbod : > - Make all fonts have a parent; for fonts created with hb_font_create(), > they will default to the hb_font_get_empty() font as their parent. This > changes the return value of hb_font_get_parent() for most

Re: [HarfBuzz] Streamlining hb_font_t some more

2015-10-02 Thread Behdad Esfahbod
On 15-10-02 06:08 PM, Konstantin Ritt wrote: > Sounds just great! > > 2015-10-02 19:51 GMT+03:00 Behdad Esfahbod >: > > - Make all fonts have a parent; for fonts created with hb_font_create(), > they will default to the hb_font_get_empty()