<div>
                    Hi,
                </div><div><br></div><div>I just found the source of my problem with kerning. It indeed happens only in JavaScript.</div><div><br></div><div>A few functions use int64_t casts when scaling coordinates from font-space to user-space. This wreaks havoc on Emscripten, because JavaScript doesn't have an integer type big enough to hold a 64-bit integer.</div><div><br></div><div>Would it be sufficient to use int32_t in these cases instead? IMO it's not likely that (coordinate * scale) is ever going to be larger than 2 billion. Am I missing something?</div><div><br></div><div>Here are the problematic lines:</div><div><br></div><div>https://github.com/behdad/harfbuzz/blob/master/src/hb-font-private.hh#L177</div><div>https://github.com/behdad/harfbuzz/blob/master/src/hb-font-private.hh#L182</div><div>https://github.com/behdad/harfbuzz/blob/master/src/hb-font-private.hh#L450</div><div>https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-layout-common-private.hh#L798</div>
                <div><div><br></div><div>-- </div><div>Lorant</div><div><br></div></div>