spritebuilder / SpriteBuilder

Objective-C Game Development Suite
http://www.spritebuilder.com/
Other
740 stars 292 forks source link

Show preview for selected font resource files #1101

Open LearnCocos2D opened 9 years ago

LearnCocos2D commented 9 years ago

Currently neither Truetype fonts nor bitmap fonts show a preview image when the file is selected in the File View.

For bitmap fonts I would expect to see at least the atlas image as is. For truetype fonts and in general I would expect a similar example as in FontBook.app (ABCD...abcd....1234...).

cocojoe commented 9 years ago

Related to #917

We should have a general resource preview for supported types.

extrajordanary commented 9 years ago

working on an implementation of #917 now, implementing at the InspectorValue level so that implementing for font previews can be added easily

extrajordanary commented 9 years ago

Got previews working for system fonts. screen shot 2014-11-21 at

Tried a few things for user fonts but haven't quite sorted it out. I know the CCLabelTTF class uses CTFontManager to get the fonts, but I'm not sure if I can access the same already registered fonts or if it would need to be implemented again for the MenuItems to access it outside of the cocos2d.xcodeproj.

screen shot 2014-11-21 at 1

Does it make sense to do a pull request for what I've got working so far?

cocojoe commented 9 years ago

Looks good so far, ill review pull