Label wrap not work with Overflow:SHRINK

Label wrap not work with Overflow:SHRINK
0

iOS,
v3.17.2

Here is the code:

    auto createLabel = [] ()-> Label* {
        Size s = Size(50,40);
        auto label = Label::createWithSystemFont("Aansluiten\nSpel",
                                                 "Palatino-Bold" ,
                                                 18,
                                                 s,
                                                 TextHAlignment::CENTER,
                                                 TextVAlignment::CENTER);
        label->setPosition(100,200);
        label->setTextColor(Color4B::BLACK);
        
        auto debugRect = LayerColor::create(Color4B::GREEN, s.width, s.height);
        label->addChild(debugRect, -1);
        
        return label;
    };
    
    auto label0 = createLabel();
    label0->setPositionX(50);
    
    auto label1 = createLabel();
    label1->setOverflow(Label::Overflow::SHRINK);
    label1->setPositionX(150);
    
    auto label2 = createLabel();
    label2->setPositionX(250);
    label2->setSystemFontSize(9);

32%20PM

Label1(middle) breaks the word which is not expected.
Label2(left) results what I expected.
I manually set the font size to 9 on Label2, and I expected Label1 should automatically shrink to font size 9, but it doesn’t.

Anyone has solution for this?

Thanks