Getting rid of the line beside the numbers

chongyunxiang

  • Posts: 216
I drew my font on the scene and when I test the game, there's a single line appearing at the side of the numbers. The larger I set the font size to be, the more visible the line will be. Is it because of my font? But that can't be. I tried using different fonts and ended up with the same problem.

The pic I attached is really small, so sorry.

MattHutchings

  • Posts: 224
Hi there,
This may sound a bit odd but just try setting your canvas size bigger but leaving your image size the same so that there is a transparent pixel that runs around the outside of your image. So if your image was 20 x 25 then make it  22 x 27. See if that works as I had a simple issue and this sure enough fixed it.

Hope this helps,
Matt.

chongyunxiang

  • Posts: 216
Hi Matt,

You mean to increase the workspace? I'm trying to work for mobile, 320 x 480. What I did was to display a font showing my score, and this happens. There's only the background image running. So when you say increase canvas size, I don't quite understand.

MattHutchings

  • Posts: 224
Hi again,
I assumed you were using a custom font and there for had a image to edit, if not I think you might be able to fix this issue by simply applying  one of the default fonts to your draw event.

Bests,
Matt.

chongyunxiang

  • Posts: 216
Hi Matt,

Yep! It's a custom font. How do I edit the image? I only see an import font in Stencyl and font color editing tools.

Thanks

TheIndieStation

  • *
  • Posts: 2261
Try increasing or decreasing the Font size.

MattHutchings

  • Posts: 224
Hi,
I would suggest downloading Gimp as it is a free bitmap editing software. http://www.gimp.org/downloads/
Use this to change any custom images your using in your game. Once downloaded and installed follow these steps:
Step 1-  Open Gimp > Open Your Image
Step 2- Image > Canvas Size
Step 3- Adjust the size accordingly
http://www.gimp.org/downloads/

You will need to add 1px on the top, bottom, left, and right, of each character you're trying to add.
If you cannot get it to work then send me your image and i'll sort it for you.
Bests,
Matt.

chongyunxiang

  • Posts: 216
Hi Matt,

I downloaded Gimp, but the font that I downloaded don't have any Image included. There's only the .tff file and a .gif file about the author and license.

So sorry as I don't know much about font editing.

Here's where I got the font: http://www.dafont.com/04b-19.font?text=wasted

MattHutchings

  • Posts: 224
Hi again,
I have sorted the image out for you and attached it to this post. If its too big you can just adjust it in GIMP now you have downloaded it.
Then actual font size is 34px 54px when you import it you will need to do it as 36px 56px

Hopefully this should fix the issue.
Best,
Matt.

chongyunxiang

  • Posts: 216
I downloaded the image file you sent and I tried importing image into Stencyl. It says file cannot exceed 1024 in all dimensions. So I brought it into illustrator and resize it, then exported a 677x257 png image of it. Stencyl still says file cannot exceed 1024. And Gimp started crashing while loading the software. Matt, thanks for helping me!

« Last Edit: July 22, 2015, 08:55:38 am by chongyunxiang »

MattHutchings

  • Posts: 224
Hi again,
Its no problem at all happy to help.
That's odd, GIMP crashing may be down to your computer unfortunately. Try changing the scale from 1x down to 4x and it should open perfectly. The size for each character should be 39px 48px.

Hope this helps,
Matt.

MattHutchings

  • Posts: 224
Hi again,
Just realised I missed out the "B" on your image, so I just made a new image for you, its a tad smaller so the new font size is 31px 46px.

Let me know how you get on.
Matt.

chongyunxiang

  • Posts: 216
Thanks! I really appreciate your help. How do I use this Image in Stencyl? Sorry, I don't know much about how fonts are being imported.

MattHutchings

  • Posts: 224
Hi there,
Sorry about the late reply i've been really busy at work lately, there isn't much to it really...
Dashboard> Fonts> click here to create a new font> Name... > Import Font From Image> Import Font
The Import button is green in the upper right hand side you can't miss it.

Hope this helps.
Matt.