Answer the question
In order to leave comments, you need to log in
Responsive text size?
In css, you can do this in many ways, the easiest is to set the size in EM or REM, you can also use % with calc().
As I understand it, under the hood there is a calculation of the scale of the text, can I have the formula please?)
TTFConfig labelConfig;
labelConfig.fontFilePath = "fonts/Marker Felt.ttf";
labelConfig.fontSize = 15;
thisSessionScoreLabel = Label::createWithTTF(
labelConfig,
std::to_string(thisSessionScore),
TextHAlignment::CENTER,
visibleSize.height * 15
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question