Varsha Kamble Posted September 24, 2018 Share Posted September 24, 2018 Hi @Deltakosh and @kcoley , I am adding text meshes in model using following link. https://github.com/BabylonJS/Babylon.js/issues/4300 Mesh is getting added properly and it is getting saved as well. Now my requirement is to update the text on it. As this mesh texture is getting saved dynamically, i am trying to remove previous mesh along with its texture and adding new in place. Created a playground to replicate my issue. http://playground.babylonjs.com/#Z3WLYL Here, my problem is, Text is getting cropped if its of larger length. Also font of text gets changed based on length of added text. Tried with different length text . For smaller text font becomes small for larger text font gets increased. I want the font of text to be consistent, no matter what is length of text. Also the plane should get dynamic width based on length of text. No text should get cropped. Please help me in this. Thanks. Regards, Varsha Quote Link to comment Share on other sites More sharing options...
dbawel Posted September 24, 2018 Share Posted September 24, 2018 @Varsha Kamble Your math is incorrect. The font that you use is not able to fit in the math you set for the length of your plane and dynamic texture. If you still have issues, then I can easily build a PG scene which accommodates any text. But I hope you can identify your errors in expecting the font to fit within the mesh. DB kcoley 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted September 24, 2018 Share Posted September 24, 2018 Hope this helps https://www.babylonjs-playground.com/#TMHF80 Varsha Kamble, dbawel and kcoley 2 1 Quote Link to comment Share on other sites More sharing options...
kcoley Posted September 27, 2018 Share Posted September 27, 2018 @Varsha Kamble we have some docs updated here for dynamic textures which discusses text fitting: https://doc.babylonjs.com/how_to/dynamictexture Quote Link to comment Share on other sites More sharing options...
Varsha Kamble Posted September 28, 2018 Author Share Posted September 28, 2018 Hi @JohnK, Thanks a lot. On 9/24/2018 at 11:03 PM, JohnK said: Hope this helps https://www.babylonjs-playground.com/#TMHF80 It helped. Worked as expected. Regards Varsha Quote Link to comment Share on other sites More sharing options...
Varsha Kamble Posted September 28, 2018 Author Share Posted September 28, 2018 Hi @kcoley Thanks for the update. Will surely look into it. ? Regards Varsha kcoley 1 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.