mind0n Posted October 9, 2018 Share Posted October 9, 2018 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 Solution: https://www.babylonjs-playground.com/#YFRMAK#15 Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 9, 2018 Share Posted October 9, 2018 Have you read this yet it could help https://doc.babylonjs.com/how_to/dynamictexture#text-and-area-matching GameMonetize and trevordev 2 Quote Link to comment Share on other sites More sharing options...
mind0n Posted October 10, 2018 Author Share Posted October 10, 2018 17 hours ago, JohnK said: Have you read this yet it could help https://doc.babylonjs.com/how_to/dynamictexture#text-and-area-matching 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. Is there any way to adjust the rendering resolution of the AdvancedDynamicTexture so the text could rendered better? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted October 10, 2018 Share Posted October 10, 2018 Gald you found the solution, in case somebody wonders, the solution link is in the first post : https://www.babylonjs-playground.com/#YFRMAK#15 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.