Hi! You must be tired of me.
But I found weird behavior of lineHeight.
These labels have the same lineHeight, but the one with the wider lineWidth has smaller text.
Also, maybe splitWords doesn't work too.
This is just a report.
You don't necessarily need to fix it, since I'm using custom code.
Have a good holiday! ![]()
<!-- zimjs.com - JavaScript Canvas Framework -->
<script type="module">
import zim from "https://zimjs.org/cdn/019/zim";
new Frame(FIT, 1920, 1080, light, dark, ready);
function ready() {
let A; let B; let C;
function test() {
if (A != null) {
A.removeFrom();
A = null;
}
if (B != null) {
B.removeFrom();
B = null;
}
let variableText = "I'm sorry to bother you again."
A = new Label({
text: variableText,
labelWidth: 1400,
labelHeight: 350,
align: "center",
valign: "middle",
splitWords: true,
font: "Yusei Magic",
}).center(S).mov(0, -250).outline();
A.lineHeight = A.size * 1.25
zog(A.lineHeight)
B = new Label({
text: variableText,
labelWidth: 1000,
labelHeight: 350,
align: "center",
valign: "middle",
splitWords: true,
font: "Yusei Magic"
}).center(S).mov(0, 250).outline();
B.lineHeight = B.size * 1.25
zog(B.lineHeight)
}
test()
}
</script>
<meta name="viewport" content="width=device-width, user-scalable=no" />
