app_server: Fix applying current scale when font changes.

* The code path actually used when the client uses BView::SetFont()
   is DrawState::ReadFontFromLink(), where it forgot to a) adopt the
   original font size in fUnscaledFontSize and b) scale the font by the
   current combined scale. Fixes remaining part of #10578.
This commit is contained in:
Stephan Aßmus 2014-02-26 10:10:12 +01:00
parent d2919781c3
commit a4655126c9
1 changed files with 3 additions and 2 deletions

View File

@ -155,7 +155,8 @@ DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link)
if ((mask & B_FONT_SIZE) != 0) {
float size;
link.Read<float>(&size);
fFont.SetSize(size);
fUnscaledFontSize = size;
fFont.SetSize(fUnscaledFontSize * fCombinedScale);
}
if ((mask & B_FONT_SHEAR) != 0) {
@ -184,7 +185,7 @@ DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link)
if ((mask & B_FONT_ENCODING) != 0) {
uint8 encoding;
link.Read<uint8>((uint8*)&encoding);
link.Read<uint8>(&encoding);
fFont.SetEncoding(encoding);
}