add DINPro.ttf font example.

This commit is contained in:
吴尚昆 2022-03-03 15:34:47 +08:00 committed by osborn
parent f7daebfd77
commit 4903e1d31a

View File

@ -210,7 +210,6 @@ class TextDemo extends Panel {
text({ text({
text: "Font from custom loader.", text: "Font from custom loader.",
textSize: 10, textSize: 10,
font: 'Hanabi'
}), }),
text({ text({
text: "Font from custom loader.", text: "Font from custom loader.",
@ -218,6 +217,16 @@ class TextDemo extends Panel {
textColor: Color.BLUE, textColor: Color.BLUE,
font: new AssetsResource('Hanabi.ttf') font: new AssetsResource('Hanabi.ttf')
}), }),
text({
text: "Font from custom loader.",
textSize: 10,
}),
text({
text: "Font from custom loader.",
textSize: 30,
textColor: Color.BLUE,
font: new AssetsResource('DINPro.ttf')
}),
text({ text({
text: "This is line Spaceing 0,\nSecond line", text: "This is line Spaceing 0,\nSecond line",
maxLines: 0, maxLines: 0,