Hi Chris,
In response [1] to
http://www.amigans.net/modules/xforum/viewtopic.php?post_id=90725#forumpost90725
I had another look at it and couldn't see anything wrong with the
nsfont_split function. I cleaned it up slightly in [2], which should not
have changed the behaviour at all.
I think it's possible that the problem is in ami_font_width_glyph.
One way for the symptoms you get is for ami_font_width_glyph to be
returning different widths for the same character when it is at the end of
a paragraph, and when it is followed by a space.
So some difference due to kerning when the next character (char2 in
ami_font_width_glyph) is ' ' vs '\0'.
Because I constified the data pointed to by the utf16 and utf16next
pointers in [2] I had to fix up ami_font_width_glyph in [3] to fix the
build. There's a chance that commit [3] may have solved the problem, or
there's a chance I've broken it further if ESetInfo can't handle char2
being 0x0000.
Anyway, I think it's worth investigating the ami_font_width_glyph
function's behaviour with ' ' and '\0' for char2.
[1] I tried to register an account there a few hours ago, but perhaps that
was rejected.
[2] 09e7ea656688d717fe9ba1a8c306e83de4d928b0
[3] 9727f875255a02674e61f2bf405132c81b6f8393
Cheers,
Michael
--
Michael Drake (tlsa) http://www.netsurf-browser.org/
No comments:
Post a Comment