trueicecold Posted July 8, 2014 Share Posted July 8, 2014 Hey all I've encountered a bug making the measurement of text dimensions impossible while using canvas+ on cocoonjs. I've read (and saw the source code) that height dimension is using html DOM element to measure it, and that a different approach is needed. Question is - what approach? is there a better way of measuring Text height? Right now I'm using the same font size I put in the PIXI.Text properties as height... Thanks! Quote Link to comment Share on other sites More sharing options...
trueicecold Posted October 10, 2014 Author Share Posted October 10, 2014 I know it's old, but all of my searches shows posts left unanswered: Is there a fix to this? I'm using pixijs 1.6.1 and the text height in cocoonjs shows the entire screen height...I know I should calculate it myself, but how exactly? Is there a formula for this? I know I can use the font size for this, but it's not science, since sometimes I have to multiply it by 1.1 or 1.2, depend on the font size, to get it aligned correctly... Quote Link to comment Share on other sites More sharing options...
trueicecold Posted October 10, 2014 Author Share Posted October 10, 2014 I'll post a nice workaround based on the pixijs source code in a new thread 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.