New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use freetype #2110
Use freetype #2110
Conversation
@@ -0,0 +1,339 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件的 license 缺失
#include "base/ccConfig.h" | ||
#include <cassert> | ||
|
||
#if CC_ENABLE_TTF_LABEL_RENDERER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如何使用这个宏?是通过编辑器配置得到吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前不是. 只在 ccConfig中配置.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那加这个宏的意义是什么?如果手动关闭这个宏,会是什么效果。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
相当于移除freetype, 使用canvas渲染label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也就是说旧的实现还保留着?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原先的 Label 在所有平台都是用 Canvas API 实现渲染的。现在的改动使得在 native 平台使用了Freetype + CustomAssembler,其他平台还是原来的 Canvas API。
如果关闭宏,相当于native上还原了改动, 使用之前的 Canvas API。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,我的意思是有必要保留两套实现吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的。Canvas 绘制 Label 的逻辑是通用的,不能删除。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不能删除的原因是什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通用的Label 绘制逻辑是 js 层实现的, 如果删除 label 就无法绘制了,包括 web / 微信 等平台。之前 native 没有 label 的实现, 只是提供了 canvas 的 API。
@@ -5203,6 +5203,25 @@ static bool js_cocos2dx_spine_IkConstraint_setStretch(se::State& s) | |||
} | |||
SE_BIND_FUNC(js_cocos2dx_spine_IkConstraint_setStretch) | |||
|
|||
static bool js_cocos2dx_spine_IkConstraint_setActive(se::State& s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么会修改 spine 的绑定代码?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该是 master代码比较旧导致的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那你这部分不需要修改,让自动绑定代码去做。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好
reopen in #2125 |
No description provided.