Apparently, ServerFont::StringWidth() doesn't work for fixed width fonts...
Will look into this later. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14648 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1347,13 +1347,13 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
|||||||
if (!stringArray[i] || lengthArray[i] <= 0)
|
if (!stringArray[i] || lengthArray[i] <= 0)
|
||||||
widthArray[i] = 0.0;
|
widthArray[i] = 0.0;
|
||||||
else {
|
else {
|
||||||
// widthArray[i] = fDesktop->GetDisplayDriver()->StringWidth(stringArray[i], lengthArray[i], font);
|
widthArray[i] = fDesktop->GetDisplayDriver()->StringWidth(stringArray[i], lengthArray[i], font);
|
||||||
// NOTE: The line below will return the exact same thing. However,
|
// NOTE: The line below will return the exact same thing. However,
|
||||||
// the line above uses the AGG rendering backend, for which glyph caching
|
// the line above uses the AGG rendering backend, for which glyph caching
|
||||||
// actually works. It is about 20 times faster!
|
// actually works. It is about 20 times faster!
|
||||||
// TODO: I've disabled the AGG version for now, as it produces a dead lock
|
// TODO: I've disabled the AGG version for now, as it produces a dead lock
|
||||||
// (font use), that I am currently too lazy to investigate...
|
// (font use), that I am currently too lazy to investigate...
|
||||||
widthArray[i] = font.StringWidth(stringArray[i], lengthArray[i]);
|
// widthArray[i] = font.StringWidth(stringArray[i], lengthArray[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user