How to create Label with Chinese and Japanese characters with custom color

I use cocos2d-x (c++) ver. 3.8. on tvOS (Apple TV).

I don’t want to use TTF versions because I don’t have decent Arial TTF font which includes Chinese and Japanese characters and yet has acceptable file size (up to 1MB).

If I use the Label::createWithSystemFont() this doesn’t allow to change the text color. At least I did not find it how to change it.

auto *n =  Label::createWithSystemFont("洗牌位置", font, fontSize, dimensions, hAlignment, vAlignment);
n->setColor(Color3B::RED);
n->setTextColor(Color4B::RED);

This produces black text…

In a desperate situation I’ve tried something you might think I’m mad.
But it doesn’t work neither. The result is still black. Would you know ANY way how to change the color of the Label??

Node* NodeFactory::colorizeLabel (Label *lbl, const Color3B& color)
{
     auto *maskSprite = lbl;
    
    CCRenderTexture * rt;
        rt = CCRenderTexture::create(
                                     maskSprite->getContentSize().width*maskSprite->getScaleX(),
                                     maskSprite->getContentSize().height*maskSprite->getScaleY()
                                     , kCCTexture2DPixelFormat_RGBA8888
        );
        maskSprite->setPosition(ccp(
                                    (maskSprite->getContentSize().width*maskSprite->getScaleX())/2,
                                    (maskSprite->getContentSize().height*maskSprite->getScaleY())/2
                                    )
                                );

    
    //rt->begin();
    rt->beginWithClear(120, 120, 0, 0);
    ((Node*)maskSprite)->visit();
    rt->end();
    
    Sprite *retval = Sprite::createWithTexture(rt->getSprite()->getTexture());
    retval->setColor(Color3B::WHITE);
    //retval->setBlendFunc((ccBlendFunc) { GL_SRC_COLOR, GL_ONE });

    return retval;
}

What’s the font variable store? Also what platform. With your code ( Label::createWithSystemFont("洗牌位置",... ), on OSX El Capitan Xcode Mac Project, and using font = 'Arial' it renders the characters correctly and in RED. Also rendered correctly with “Helvetica”, “Times New Roman”, and “Courier New”.

So might be a platform-specific issue?

Correct, platform might be the problem. I’m on tvOS :frowning:
And one correction, my cocos is 3.8

It’s correct on iOS/OSX but black in tvOS…

Ah, I see. I’m not familiar with any specific reason tvOS would behave differently. Random question: have you tried “San Francisco” for the system font name? I’d presume their core system font would support all languages.

The problem is not in the language but in the color. System font shows Chinese properly but still in black color :frowning:

Issue solved by @pepeek over here: