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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Atrius

Pages: [1]
1
Graphics / Re: SFML Text Artifacts
« on: June 19, 2013, 04:12:47 am »
Sorry I haven't had time to dig into this. This was the first location I tweeted but Kyle mentioned he was working in C# and didn't have it setup to compile the libs. I got home from work and looked into it.

These pixels are still required for the underline to work. If you remove the code that sets these pixels it fixes the problem but also makes it so underline doesn't work.

This confirms the issue is caused by the code at SFML/Graphics/Font.cpp:584. However, it also brings to light that you cannot remove this without losing functionality.

When I get some more time I'll look into if this can be improved and retain the functionality.

2
Graphics / Re: SFML Text Artifacts
« on: June 18, 2013, 05:55:03 am »
@TechRogue-- In C#, I tried drawing to a RenderTexture with smooth set to false, and then copying that to a sprite and drawing it on the window. It still occurs. So it doesn't appear to be smoothing related.


I was able to repro this using C++ with the SFML 2.0 windows binaries. It's not the C# wrapper.

I don't see the extra pixel when I create and draw the Text object, but if I scale it, it's instantly visible.


        sf::RenderWindow window(sf::VideoMode(1024, 768), "Test Window");

        sf::Font font;
        if (!font.loadFromFile("c:\\windows\\fonts\\arial.ttf")) return EXIT_FAILURE;

        sf::Text text("test", font, 100);
        text.setPosition(50,50);
        text.setScale(2,2);

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                        {
                                window.close();
                        }
                }
                window.clear();
                window.draw(text);
                window.display();
        }


Pages: [1]