0

Hi i'm facing problem in adjusting spacing between lines in cocos2d-x using cclabelttf . i just want to make sure that do we have any property to change line spacing in cocos2d-x

4

1 回答 1

1

我最近想减少我的行距(应用程序范围,而不是单个标签),并在这里写下我的工作:http: //devdiary.arcticempire.ca/2014/05/02/dev-diary-31-cocos2d -x-ttf-行间距/

简而言之...获取Apple Font Tool Suite,然后

ftxdumperfuser -t hhea -A d font.ttf  # export font header to XML
[Edit XML - set lineGap to 0 and adjust ascender and descender as you like.
Test with all characters you'll want to print]
ftxdumperfuser -t hhea -A f font.ttf  # import XML to font header

如果您使用的是 Android,则应在 Cocos2dxBitmap.java 中将“top”更改为“ascent”,将“bottom”更改为“descent”。

于 2014-05-03T05:07:56.323 回答