Implemented StringWidth in ServerFont, updated ServerApp to use it, and removed a -1 from TextView in the char location calculation, which I didn't understand and without which the cursor location and related stuff now finally work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12744 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1215,8 +1215,8 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg)
|
||||
font.SetSize(size);
|
||||
font.SetSpacing(spacing);
|
||||
|
||||
width = desktop->GetDisplayDriver()->StringWidth(string, length, font);
|
||||
|
||||
width = font.StringWidth(string, length);
|
||||
|
||||
replylink.StartMessage(SERVER_TRUE);
|
||||
replylink.Attach<float>(width);
|
||||
replylink.Flush();
|
||||
|
||||
Reference in New Issue
Block a user