【问题标题】:Reduce Line Spacing CClabelTTF font cocos2d-x减少行距 CClabelTTF 字体 cocos2d-x
【发布时间】:2014-03-10 19:39:09
【问题描述】:

您好,我在使用 cclabelttf 调整 cocos2d-x 中的行间距时遇到了问题。 我只是想确保我们有任何属性来改变 cocos2d-x 中的行距

【问题讨论】:

  • 对我来说同样的问题,但对于 cocos2D v3。

标签: line cocos2d-x spacing cclabelttf


【解决方案1】:

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

简而言之...获取 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-04-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多