Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Bitmap Fonts, what is state of the art?
Started by jack95 Oct 27 2017 08:37 AM

- - - - -
21 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

jack95

[GLOBAL: userInfoPane.html]
jack95
  • Contributor

  • 194 posts
  • Corona SDK

I tried using TextCandy for a long time, but it's clunky and difficult and out of date and memory unsafe.

Fontself isn't a panacea with no customer support and spotty functionality in the latest Photoshop.

Glyphs is Mac Only (do I need to get a mac now?)

 

I don't know of anything else promising.

 

Is there any other way to get fat stroked gradient colored bitmap fonts, 5 years later? It's one of the few stand out issues that has plagued my development.



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,587 posts
  • Corona SDK

Interesting question.  I know there are serveral solutions, but not which is most up-to-date and/or easiest to use.

 

Probably something I should put in SSK 2.

 

 

@everyone/anyone - If you use Bitmap Fonts and tools, please share your experiences with us.



[TOPIC: post.html]
#3

jack95

[GLOBAL: userInfoPane.html]
jack95
  • Contributor

  • 194 posts
  • Corona SDK

Although I haven't yet tried it, the latest looks like 

https://www.bmglyph.com/

or

https://71squared.com/glyphdesigner

 

maybe paired with

 

https://github.com/autismuk/Font-Manager



[TOPIC: post.html]
#4

ponywolf

[GLOBAL: userInfoPane.html]
ponywolf
  • Contributor

  • 268 posts
  • Corona SDK

Ponyfont and Ponystroke...

 

https://github.com/ponywolf

 

Enjoy...



[TOPIC: post.html]
#5

StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
  • Contributor

  • 814 posts
  • Corona SDK

I don't know where, if at all, this fits into the topic, but just in case...

 

I have a plugin for rendering text, although I've left it hidden (but should be usable) owing to the obviously lacking state of its docs. I keep meaning to set aside some time and flesh them out, but thus far that time hasn't come.  :( The glyphrenderer and FontInfo pages are the most relevant ones. The other pages are fairly low-level and not well-tested; in theory their APIs can be used to build meshes of glyphs, an avenue do I hope to explore, but I should probably just omit them for now.

 

The plugin is a very thin veneer over the stb_truetype library in stb that seems to be a popular choice for rendering text. The FontInfo:Make*Bitmap*() APIs offer a few ways to do this. They render characters out as blobs of bytes, which my Bytemap plugin was made to address. (The sample shows a use case or two.) In light of Corona's own recent addition of font metrics APIs I'm not sure how much the remaining FontInfo methods bring to the table... I'll have to investigate whenever I do finally get back around to this project and decide what to do about them.

 

EDIT: An example video of the plugin I mentioned, which I'm lately updating, is shown here. (I've finally been attending to the docs too.) I might see if I can rename it to truetype as well, so the link above might not be long for this world.



[TOPIC: post.html]
#6

zolnier

[GLOBAL: userInfoPane.html]
zolnier
  • Enthusiast

  • 79 posts
  • Corona SDK

Hey, does anyone know if there is a way to add the ponystroke text output to a display group so I can use it in composer?  Right now, it doesn't seem to output the stroked text inside the scene, so it persists on-screen upon scene changes.



[TOPIC: post.html]
#7

ponywolf

[GLOBAL: userInfoPane.html]
ponywolf
  • Contributor

  • 268 posts
  • Corona SDK

Try adding yourText.raw 

 

This is the display group or container that contains the text...



[TOPIC: post.html]
#8

JoePringles

[GLOBAL: userInfoPane.html]
JoePringles
  • Contributor

  • 356 posts
  • Corona SDK

Hey this might be a stupid question but is bitmap font the same as font?



[TOPIC: post.html]
#9

zolnier

[GLOBAL: userInfoPane.html]
zolnier
  • Enthusiast

  • 79 posts
  • Corona SDK

Well, looky looky!  That worked!   yourText.raw did it!  Thanks, no2games!  Brilliant!



[TOPIC: post.html]
#10

ponywolf

[GLOBAL: userInfoPane.html]
ponywolf
  • Contributor

  • 268 posts
  • Corona SDK

I have two font libraries... ponyfont takes a spritesheet of letters and makes text out of it. Hence a bitmap font... They are cool because each letter is a separate image, so you can do cool effects with them

 

https://github.com/ponywolf/ponyfont

 

ponystroke just bulids a "stroked" font out of multiple copies of a regular TTF font

 

https://github.com/ponywolf/ponystroke



[TOPIC: post.html]
#11

zolnier

[GLOBAL: userInfoPane.html]
zolnier
  • Enthusiast

  • 79 posts
  • Corona SDK

Yeah, that ponystroke library is AMAZING!



[TOPIC: post.html]
#12

ponywolf

[GLOBAL: userInfoPane.html]
ponywolf
  • Contributor

  • 268 posts
  • Corona SDK

Glad you like it. We have a few more free things... They get updated every now and again....

 

https://github.com/ponywolf



[TOPIC: post.html]
#13

zolnier

[GLOBAL: userInfoPane.html]
zolnier
  • Enthusiast

  • 79 posts
  • Corona SDK

Yeah, I'll look at your ponyfont library.  I've had TextCandy for years but I have not loved it.



[TOPIC: post.html]
#14

JoePringles

[GLOBAL: userInfoPane.html]
JoePringles
  • Contributor

  • 356 posts
  • Corona SDK

woahh woah woah woah.

what is bitmap font?



[TOPIC: post.html]
#15

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,925 posts
  • Enterprise

@Supreme Leader, a bitmap font is where you use a tool like "bmglyph" that takes vector fonts (like True-Type fonts) and outputs a .PNG file (Raster image or bitmap) where you can apply various effects like strokes, gradients, drop shadows and more.  The resulting bitmap image file can be loaded into Corona as a sprite sheet and using third-party code like @Ponywolf's "ponyfont" can display text in your game/app.  Consider this screenshot:

 

Screen Shot 2018-01-31 at 1.05.50 PM.png

 

It is a mix of regular display.newText() API calls and calls to a third-party bitmap font library.  Both use the same font family (Carbon) but the label at the top is done with a bitmap font while the content for each IAP purchase is done with display.newText() which you can pretty much only control solid colors with.

 

Rob



[TOPIC: post.html]
#16

anaqim

[GLOBAL: userInfoPane.html]
anaqim
  • Contributor

  • 770 posts
  • Corona SDK

Hi, using display.newText() with object.fill.effect gradient works fine and can also do the effect of the bitmap font up there. The main limitation is that whatever effect you want is for the text object as a whole and not individual charactets, but that can be overcome using a loop and a table og text objects So, its not only single colors for the corona api

[TOPIC: post.html]
#17

JoePringles

[GLOBAL: userInfoPane.html]
JoePringles
  • Contributor

  • 356 posts
  • Corona SDK

Ah interesting.

 

Thanks for the info.



[TOPIC: post.html]
#18

zolnier

[GLOBAL: userInfoPane.html]
zolnier
  • Enthusiast

  • 79 posts
  • Corona SDK

Since we're talking text here and it seems like you might be the guru to help me and others with this - any way you can think of to print a text string along a gentle curve/arc (NOT a full circle)? 

 

I just posted this question here, as well:

https://forums.coronalabs.com/topic/71627-easy-way-to-print-text-along-a-curve-not-a-full-circle/

 

 

Thoughts?



[TOPIC: post.html]
#19

anaqim

[GLOBAL: userInfoPane.html]
anaqim
  • Contributor

  • 770 posts
  • Corona SDK

Hi, i am no guru just a user and i have never done that but i would think it would be neccesary to create a function for it where a text string is inserted, and each character is created as a single text object belonging to a new display geoup. Then of course it is the matter of calculation how to set parameters like x, y, rotation, scale and color fill according to desired geometry. Its a task but probably well worth designing, unless someone already did it and can provide the function

[TOPIC: post.html]
#20

zolnier

[GLOBAL: userInfoPane.html]
zolnier
  • Enthusiast

  • 79 posts
  • Corona SDK

anaqim, I have done that and it comes across a little wonky from a spacing, rotation and layout perspective so I'm hoping someone else has found success with this...



[TOPIC: post.html]
#21

marcus80

[GLOBAL: userInfoPane.html]
marcus80
  • Observer

  • 6 posts
  • Corona SDK

Glad you like it. We have a few more free things... They get updated every now and again....

 

https://github.com/ponywolf

 

I just wanted to point out, that it doesn't work with UTF-8 without some modifications. Replacing the string calls with utf8 where individual characters are handled seems to solve it, but I haven't tried it much yet.



[TOPIC: post.html]
#22

ponywolf

[GLOBAL: userInfoPane.html]
ponywolf
  • Contributor

  • 268 posts
  • Corona SDK

Yeah, UTF8 is in a state of flux... 




[topic_controls]
[/topic_controls]