Rob Gordon Posted March 31, 2020 Share Posted March 31, 2020 Greetings, I'm new-ish to Pixi, but not new to HTML5 development (slowly making my way over from CreateJS, Flash before that, Director before that). This is also my first forum post. I'm having an issue getting BitmapFonts properly created when resolution is > 1. I use bmGlyph to make the fonts in 2 resolutions. If I leave the fnt/png files separate and external, everything works as it should in both resolutions. If I include the png texture in my game's spritesheet (I use only 1), convert the fnt to a txt file (so it won't look for the png file on import) and then do this: str = "AvenirLtStdMd"; xml = stringToXML(Loader.resources[str].data); texture = mySpriteSheet.textures[str]; BitmapText.registerFont(xml, texture); ...it all works perfectly when resolution is 1. However, when resolution is 2 the text is not rendering correctly, and the error seems to be with the font creation (I can see chunks of other parts of the spritesheet...implying an offset error of some sort). Do I need to manually make any adjustments to the fnt file content? To the texture? Might this be a bug? There should be some significant performance advantages to having all bitmap assets, including fonts, in a single spritesheet. Cheers, r o b Quote Link to comment Share on other sites More sharing options...
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.