Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cocos2dx/platform/win8_metro/DXTextPainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@ Platform::Array<byte>^ DXTextPainter::DrawTextToImage(Platform::String^ text, W
// Originally provided tSize (provided with an original resolution)
// will be used - so layoutTextSize should be calculated.
layoutTextSize.Width = tSize->Width / GetResolutionScale();
layoutTextSize.Height = tSize->Height / GetResolutionScale();
// adjust height just in case if it is provided
if (tSize->Height > 0)
{
layoutTextSize.Height = tSize->Height / GetResolutionScale();
}
}

if(tSize->Height <=0)
Expand Down