royibernthal Posted June 6, 2017 Share Posted June 6, 2017 There are 2 issues, the second issue I actually found when trying to reproduce the first one. 1) When resizing a TextBlock with a custom font that was embedded via css it is cropped and/or rendered badly. (Size is dependent on idealWidth so resize the window to test) 2) Embedded font doesn't render in bjs even though it is clearly loaded. In my local project it is rendered properly but for some reason in the repro it uses the default font instead. I tried to set a long timeout to make sure the font was loaded (although DOMContentLoaded should suffice), still no luck. Once this second issue is solved you'll be able to test the first one. Repro: http://mindcombustion.com/misc/bjs_test/ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 7, 2017 Share Posted June 7, 2017 Haha Please provide a repro in the PG first please Quote Link to comment Share on other sites More sharing options...
royibernthal Posted June 7, 2017 Author Share Posted June 7, 2017 Here you go http://www.babylonjs-playground.com/#XCPP9Y#84 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 8, 2017 Share Posted June 8, 2017 there were a typo, you used fontFamiliy instead of fontFamily. Furthermore, you need to wait for the font to be loaded: http://www.babylonjs-playground.com/#XCPP9Y#86 Quote Link to comment Share on other sites More sharing options...
royibernthal Posted June 9, 2017 Author Share Posted June 9, 2017 I hate typos, so hard to find. Do you know if DOMContentLoaded takes font loading into account? It seems the first issue doesn't happen only with text blocks, small parts of controls are not being rendered when I'm resizing things that depend on idealWidth. The calculated width and height apparently are smaller than what they should be in order to render everything, or alternatively they are calculated well and the problem is with the actual rendering, or I'm missing something again I'll try to create a PG soon. GameMonetize 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.