Label not rendering on right side in desktop view

Hi all, I have a project where a label should fit the width of the screen but cannot use widget since have some animation.
So I’m using cc.winsize to set the width of the label but when opened in desktop right part looks like its been masked. When the width is reduced its visible clearly.

Can anyone help me to understand why is this happening.

I’m using Cocos Creator v2.4.4

Screenshot 2021-06-22 at 7.25.06 PM

Demo build with this error happening when opened in desktop. ( please vary the width of the browser to see differences)
web-mobile.zip (580.9 KB)

Thank you.

I can ask engineering for their thoughts.

1 Like

You can use Char mode:
图片

https://docs.cocos.com/creator/manual/en/components/label.html#cache-mode

1 Like

@zzf_Cocos , @slackmoehrle Thank you for your support.
It worked as intended.
But I didn’t get why its happening that way though.

Because the size of the atlas when rendering text is limited to 2048 * 2048 in None and Bitmap modes, a phase occurs if this size is exceeded. Using Char mode is not.

1 Like

Got it. Thank you @zzf_Cocos .

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.