Ninjadoodle Posted February 23, 2018 Share Posted February 23, 2018 Hi @enpu - When adding a *.fnt asset - the engine is looking for a @2x /@4x version of the font. Does panda only support fnt fonts (bitmap?) or can it also load ttf etc? Thank you! Quote Link to comment Share on other sites More sharing options...
enpu Posted February 24, 2018 Share Posted February 24, 2018 @Ninjadoodle Thanks for the info, this should be now fixed. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted February 24, 2018 Author Share Posted February 24, 2018 @enpu Thanks! Just wondering whether panda only supports bitmap fonts, or whether we can load other formats (vector)? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted February 27, 2018 Author Share Posted February 27, 2018 @enpu - I'm still trying to get fonts into my game, but I would prefer not to have to use bitmap (if I don't have to). Not sure if it's possible tho. Quote Link to comment Share on other sites More sharing options...
enpu Posted February 27, 2018 Share Posted February 27, 2018 @Ninjadoodle There is no way to natively load vector fonts (TTF etc) in JavaScript. What i could do is to make a plugin of Web Font Loader: https://github.com/typekit/webfontloader Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted February 27, 2018 Author Share Posted February 27, 2018 @enpu - Thanks for the heads up, with the web font loader would you be able to include the fonts with the game (so they don't have to be downloaded?). Quote Link to comment Share on other sites More sharing options...
enpu Posted February 27, 2018 Share Posted February 27, 2018 https://github.com/typekit/webfontloader Yes if you look at the "Custom" section, you can define your own CSS file that would contain all your fonts and their source files Quote Link to comment Share on other sites More sharing options...
enpu Posted February 27, 2018 Share Posted February 27, 2018 Not a really clean way that you need to manually create your own CSS file for the fonts, need to take a look if there is a way to create the CSS within JavaScript. Will put this on my todo-list (that's a pretty long one, and this is not likely the highest priority) Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted February 27, 2018 Author Share Posted February 27, 2018 @enpu - I'll probably just stick to bitmap fonts (seems more straightforward), but thanks you for explaining! 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.