简体   繁体   English

cc.LabelTTF:字符之间的间距

[英]cc.LabelTTF: spacing between characters

Is there a way to change a space between characters? 有没有办法改变字符之间的间距? Some ttf font strings look very compressed. 一些ttf字体字符串看起来非常压缩。

The maximum closest thing I've managed to find is cc.FontDefinition But it doesn't look like it contains anything specific I need. 我设法找到的最接近的东西是cc.FontDefinition,但它似乎不包含我需要的特定内容。

As far as I know there is no method to change space between characters but you can change letters position via accessing it. 据我所知,没有方法可以更改字符之间的间距,但是可以通过访问来更改字母位置。

label.getLetter(index);

returns the character as a sprite. 返回该字符作为精灵。 And then you can set its position. 然后可以设置其位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM