Re: [HarfBuzz] Inconsistent shaping across systems

2015-08-19 Thread Koji Ishii
Though I really didn't look into font tables, the instinct tells me that
880 is the correct value. Adobe fonts usually use an em-box that is 12%
below the Latin baseline[1],

The vertical origin is usually determined by VORG, or vmtx if missing, or
ascent if missing. The font has TypoAscender 880;[2].

I don't know where Mac took the value from, but 1.4% looks a little large
error. If it uses CoreText, there used to be a few bugs to get vertical
origin in CoreText. I though they were fixed in recent OS X though. Maybe
CoreText tweaks values from OpenType tables for some reasons?

1000 looks like an em-box. Since all these variations have constant
offset, and advances are the same among the 3 configurations, so I'm not
sure what the real downsides of using 1000 though.

I'm not familiar with the coordinate system in Harfbuzz, sorry if the
coordinate system handles such offset and the above was pointless.

[1]
https://blogs.adobe.com/CCJKType/2012/01/afdko-features-tips-tricks-part-1.html
[2]
https://github.com/adobe-fonts/source-han-sans/blob/master/Light/features.JP

/koji

On Wed, Aug 19, 2015 at 4:14 AM, Simon Cozens si...@simon-cozens.org
wrote:

 On 18/08/2015 11:38, Behdad Esfahbod wrote:
  Linux
  [gid9861=0@-500,-880+0,-1000|gid27506=1@-500,-880+0,-1000]
  OS X
  [gid9861=0@-500,-894+0,-1000|gid27506=1@-500,-894+0,-1000]

  Try with --font-funcs=ot.

 Thanks; that gives -1000+0 on both OS X and Linux.

 Now it is getting more and more important to move SILE to OT rather than
 FT...

 S

 ___
 HarfBuzz mailing list
 HarfBuzz@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/harfbuzz

___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz


Re: [HarfBuzz] Inconsistent shaping across systems

2015-08-18 Thread Behdad Esfahbod
On 15-08-17 08:51 AM, Simon Cozens wrote:
 More details at https://github.com/simoncozens/sile/issues/164 , but in
 a nutshell, using Noto Sans CJK JP and TTB direction, Ubuntu 12 gives:
 
 $ md5sum  ~/.fonts/NotoSansCJKjp-Light.otf
 f269c193b1ef0b739030d56386670c3f  /home/simon/.fonts/NotoSansCJKjp-Light.otf
 $ hb-shape --direction=ttb ~/.fonts/NotoSansCJKjp-Light.otf '世界'
 [gid9861=0@-500,-880+0,-1000|gid27506=1@-500,-880+0,-1000]
 
 and OS X (not using CoreText) gives
 
 $ md5sum ~/Library/Fonts/NotoSansCJKjp-Light.otf
 f269c193b1ef0b739030d56386670c3f  ~/Library/Fonts/NotoSansCJKjp-Light.otf
 $ hb-shape --direction=ttb ~/Library/Fonts/NotoSansCJKjp-Light.otf '世界'
 [gid9861=0@-500,-894+0,-1000|gid27506=1@-500,-894+0,-1000]

This is quite probably a rounding issue happening in hb-ft.  I've seen it on
Mac before.

Try with --font-funcs=ot.  Our ot font funcs currently don't fully implement
all funcs.  And don't support VORG table, but then again, neither does FreeType.

behdad
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz