Eli Zaretskii writes: Thanks for the comments, I'm attaching a rectified patch. I think the rest of what you've brought up has been resolved by the new patch, but I would like to clarify something here: > There's no reason to use -= and += here. The callers never initialize > the argument to anything but zero, nor should they. This function > _calculates_ the offset, it doesn't _correct_ it. So a simple > assignment should do better, because using the above begs the > question: what could the initial value be? The callers should add or > subtract the corrections as they see fit. I changed the function to use an internal accumulator variable initialized to 0. The -= and += is still necessary, as we are inside a loop which can potentially go through many glyphs that are relevant. Thanks.