Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Font with outline is transparent  (Read 1244 times)

0 Members and 1 Guest are viewing this topic.

mentor

  • Newbie
  • *
  • Posts: 31
    • View Profile
Font with outline is transparent
« on: December 18, 2014, 08:32:26 pm »
Hi there,

I downloaded this font: http://www.1001freefonts.com/snacker_comic.font. It is supposed to be white with black outline. But in my project I get this instead:
http://i.imgur.com/iLoo8ko.png
You see, outline is ok, it is black. But the rest of the font color is transparent and I don't know why. I saw that I have the same problem in Paint - this font just won't work properly.

In my project I have two variables, a font and a text, I load and set them as this:
//there's using namespace sf somewhere up there

Font snacker;
Text example;

snacker.loadFromFile("data/fonts/snacker.ttf");

example.setFont(snacker);
example.setCharacterSize(26);
example.setColor(Color::Black);
example.setStyle(Text::Regular);
example.setPosition(Vector2f(630, 360));
example.setString("Pizza Box");

Is there any chance that this font would work?
« Last Edit: December 18, 2014, 08:55:49 pm by Laurent »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Font with outline is transparent
« Reply #1 on: December 18, 2014, 08:51:38 pm »
Quote
It is supposed to be white
What makes you think it should be white and not transparent? The background on 1001freefonts.com is white, so you can't really tell.
Laurent Gomila - SFML developer

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: Font with outline is transparent
« Reply #2 on: December 18, 2014, 08:52:17 pm »
That's how the font is, transparent.

mentor

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Font with outline is transparent
« Reply #3 on: December 18, 2014, 08:52:53 pm »
OK then, I thought it's actually white. Thanks!