Aaron Wang Posted January 18, 2016 Share Posted January 18, 2016 The code is written like this: this.tableNameText = new PIXI.Text( 'BR 001', { font: '100 6px Arial', fill: '#666666' } ); This one is on OS X, it's showing perfectly. This one is on Windows, it doesn't show correctly. The text is too big, any idea what could cause this? thanks. I tried to use very small value for font size, like 1px, it changes nothing, is there a minimal limitation for font size? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 18, 2016 Share Posted January 18, 2016 100 is font size, 6px is line height, right? If so, try "100/6px Arial" Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 No, 100 is font weight, 6px is font size. Quote Link to comment Share on other sites More sharing options...
chg Posted January 18, 2016 Share Posted January 18, 2016 Just now, Aaron Wang said: No, 100 is font weight, 6px is font size. I don't really have a point (yet?) but neither of the supplied screenshots appear to show Arial at 6px Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 18, 2016 Share Posted January 18, 2016 font-weight is not cross-browser, in IE10 its starting only from 500 Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 2 hours ago, chg said: I don't really have a point (yet?) but neither of the supplied screenshots appear to show Arial at 6px I forgot to say that I have zoom functionality enabled, so above screenshots were actually taken while zooming in. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 18, 2016 Share Posted January 18, 2016 Try "lighter 6px Arial" Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 2 minutes ago, ivan.popelyshev said: font-weight is not cross-browser, in IE10 its starting only from 500 Yeah, but I'm using explicit value. And font weight is not the problem here, the font size is, I think. Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 2 minutes ago, ivan.popelyshev said: Try "lighter 6px Arial" Tried, it's the same Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 18, 2016 Share Posted January 18, 2016 May be the problem is `quotes` in IE ? Use 'quote' Quote Link to comment Share on other sites More sharing options...
chg Posted January 18, 2016 Share Posted January 18, 2016 You didn't say what browser/s you had tested, but have you tried using quotes rather than backticks for the style string, it would seem a bit silly to require ES6 template strings for the supplied example (also, why is the fill not a string, I though numeric colour values weren't accepted for fill) EDIT: Sorry Ivan, I didn't see your post when I posted mine (I think you must have posted while I was typing) Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 Just now, ivan.popelyshev said: May be the problem is `quotes` in IE ? Use 'quote' My mistaken, I should have replaced it with single quote when copy, paste. It's not related, the ` is ES6 string interpolation syntax, the compiled js is fine. Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 1 minute ago, chg said: You didn't say what browser/s you had tested, but have you tried using quotes rather than backticks for the style string, it would seem a bit silly to require ES6 template strings for the supplied example (also, why is the fill not a string, I though numeric colour values weren't accepted for fill) Chrome/Safari/Firefox on OS X are all fine, on Windows I only tested Chrome for now. Yes, sorry for the trouble, have updated the code. Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 18, 2016 Author Share Posted January 18, 2016 Just tried Firefox on Windows, it shows this, the font size looks almost ok, but the top of last line is chopped. Quote Link to comment Share on other sites More sharing options...
Aaron Wang Posted January 19, 2016 Author Share Posted January 19, 2016 I worked around this problem by making everything twice bigger then scale the stage 50 percent down. Seems like too small font size just won't work. 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.