Automatic font splitter

Post your Construct-made creations!

Post » Fri Jan 01, 2010 1:18 am

actually arima
I didn't catch what you had said about the cropping shortcut
so that pretty much covers what we need
does it do fonts on a grid with x and y or just in a line?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Jan 01, 2010 1:26 am

Ah. Well, sorry I misunderstood then.

The fonts need to be written entirely horizontally, as it checks each column of pixels for a letter. There's an example image in the .zip that shows how they need to be arranged.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Fri Jan 01, 2010 11:02 am

Cool. So basically instead of splitting an image by a grid (eg. 32x32 pixels) it splits the image by 'gaps'. So when you write 'ABCDEF' etc... each letter has a gap between it and so it crops and makes an image out of it? Would it be useful if I added that functionality into the import image dialog. A 'split by gap' button?
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Fri Jan 01, 2010 11:05 am

What happens with fonts that intentionally have gaps in individual characters?
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Fri Jan 01, 2010 1:09 pm

[quote="David":1ov2s8ih]Cool. So basically instead of splitting an image by a grid (eg. 32x32 pixels) it splits the image by 'gaps'. So when you write 'ABCDEF' etc... each letter has a gap between it and so it crops and makes an image out of it? Would it be useful if I added that functionality into the import image dialog. A 'split by gap' button?[/quote:1ov2s8ih]
that would be cool
especially if you could specify the background color
cuz most of the sprite font sheets you find out there are split up by a color, like pink, or black, while a few of them are split by 0 alpha


also if the regular split by grid (eg. 32x32 pixels) function was visual
so you could dial up the numbers and see a visual grid of how they were being split
and increase and decrease the grid size until it lined up

as of now
you have to keep reimporting the sprites over and over if you're not sure what the grid size is

also, if you could make the "split by gaps" handle xy stuff like this:

you would be radical
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Jan 02, 2010 12:48 am

[quote="David":379g2osz]Would it be useful if I added that functionality into the import image dialog. A 'split by gap' button?[/quote:379g2osz]
That, and support for importing tile maps in the image editor, has been requested a lot before, so I think it'd be good to add.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Jan 02, 2010 9:26 pm

I would have responded earlier, but the forums wouldn't let me post for a while.

[quote="David":33ogy333]So when you write 'ABCDEF' etc... each letter has a gap between it and so it crops and makes an image out of it?[/quote:33ogy333]

Yep, except for the cropping part (as mentioned about the image manipulator's crop feature not working). It's actually using layer masking to 'clear' the rest of the font sprite away aside from the current letter.

If you want to implement it in construct, that'd be awesome!

[quote="Lost my Keys":33ogy333]What happens with fonts that intentionally have gaps in individual characters?[/quote:33ogy333]

Exactly the same thing as with other gaps, it will be made into a separate image, so it won't work with some fonts.

lucid: I thought about doing that (checking for horizontal gaps using the same method as checking for columns of pixels, then checking each row like the font splitter currently does) when I was thinking about the sprite sheets thing, but thought it wouldn't work well due to the semi-chaotic way sprite sheets are sometimes set up. However, with an image like that, it would work well. David might make my font splitter obsolete, though. :)
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Previous

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 2 guests