Recommended Posts

Refer to the link below, it looks like that the fatness of the font will be impacted by the width & height of the plain mesh.  This is not what I expected. 

Actually I want the font be rendered normally no matter what the mesh size is.  Is there way to fix this issue?  How to calculate an appropriate size to make the font look better?

https://www.babylonjs-playground.com/#YFRMAK#11

image.png.f174b89fb85b94117cddb90e9312adf1.png

Solution:

https://www.babylonjs-playground.com/#YFRMAK#15

 

Share this post


Link to post
Share on other sites
17 hours ago, JohnK said:

Hi @JohnK, if you look at my code, what I'm using is AdvancedDynamicTexture, not the DynamicTexture within the provided link above.

Quote
var tx = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plain);
tx.diffuseColor = new BABYLON.Color3.White();
tx.emissiveColor = new BABYLON.Color3.White();
tx.width = 3000;
tx.height = 1000;

The advancedDynamicTexture were created based on the mesh size automatically. 

Setting the width & height of AdvancedDynamicTexture does not make any difference of the TextBlock rendering. 

And setting the width & height of the StackPanel / TextBlock will only crop the rendered text.

image.png.a5d18c511305fcd6b63cb72602cef4b4.png

Is there any way to adjust the rendering resolution of the AdvancedDynamicTexture so the text could rendered better?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.