Create a test case for issue 4999(label is unsharp if it's created by smaller font).

This commit is contained in:
Dhilan007 2014-05-29 14:00:38 +08:00
parent e1bb1c62c0
commit 2a6158bae1
2 changed files with 31 additions and 1 deletions

View File

@ -78,7 +78,8 @@ static std::function<Layer*()> createFunctions[] =
CL(LabelTTFOldNew),
CL(LabelFontNameTest),
CL(LabelAlignmentTest),
CL(LabelIssue4428Test)
CL(LabelIssue4428Test),
CL(LabelIssue4999Test)
};
#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0]))
@ -1779,3 +1780,21 @@ std::string LabelIssue4428Test::subtitle() const
{
return "Reorder issue #4428.The label should be flipped vertically.";
}
LabelIssue4999Test::LabelIssue4999Test()
{
auto label = Label::createWithTTF("Smaller font test", "fonts/arial.ttf",5);
label->setPosition(VisibleRect::center());
label->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
addChild(label);
}
std::string LabelIssue4999Test::title() const
{
return "New Label Bugs Test";
}
std::string LabelIssue4999Test::subtitle() const
{
return "Reorder issue #4999.The label should be display cleanly.";
}

View File

@ -496,6 +496,17 @@ public:
virtual std::string subtitle() const override;
};
class LabelIssue4999Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue4999Test);
LabelIssue4999Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
// we don't support linebreak mode
#endif