Skip to content
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

修复font空属性导致fontsize异常的bug #20743

Open
wants to merge 8 commits into
base: v4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cocos/renderer/CCTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ void VolatileTextureMgr::addImage(Texture2D *tt, Image *image)

VolatileTexture *vt = findVolotileTexture(tt);
image->retain();
CC_SAFE_RELEASE_NULL(vt->_uiImage);
vt->_uiImage = image;
vt->_cashedImageType = VolatileTexture::kImage;
vt->_pixelFormat = tt->getPixelFormat();
Expand Down
2 changes: 1 addition & 1 deletion cocos/ui/UIRichText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ void MyXMLVisitor::startElement(void* /*ctx*/, const char *elementName, const ch
auto result = tagBehavior.handleVisitEnter(tagAttrValueMap);
ValueMap& attrValueMap = result.first;
RichElement* richElement = result.second;
if (!attrValueMap.empty()) {
if (tagBehavior.isFontElement){
Attributes attributes;

if (attrValueMap.find(RichText::KEY_FONT_SIZE) != attrValueMap.end()) {
Expand Down