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:
Stephan Aßmus
2005-05-20 17:36:55 +00:00
parent 097d641852
commit 38c5a7b7fa
4 changed files with 34 additions and 5 deletions
+2 -2
View File
@@ -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();