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 - nachy

Pages: [1]
1
General discussions / Benchmark : SDL vs SFML
« on: March 28, 2010, 05:26:51 am »
Quote from: "T.T.H."
In addition SDL does loose even more appeal in my eyes after reading that there will be a commerial license for it (with all the cool features of course like e.x. statically linking). Nothing against paying good money for good software but in my case I can get all I want (usability, speed, coding for the laptop, not coding for the fridge = SFML) for free (SFML's zlib/png license).

This is exactly the reason why I chose SFML now. Not any performance difference, nor OOP aspect. Only the license.
For me SDL used to be THE free lib for platform independent graphic stuff even if it never was with it's gpl license but this step towards adding a commercial license killed it for me. Their comparison chart alone is so yuck.
I guess it's ok if you actually want to use it commercially or want to bother with the GPL but I've come to the conclusion that I want to bother with licenses the least possible with my small projects and the zlib/png one is perfect for that.

I'm sure you can also code fast software with SDL if you tweak things, use HW rendering, OpenGL and so on. The tests were supposed to show a difference with "default settings" though I think. Like if you're new to both libs and write your first application. Some people are taking it too serious.

On a side note this little application I have seems to be running faster with still-WIP-SFML2 than it did with SFML1.5. So either it's just something related to my application or SFML will have some performance gain once version 2 is a stable release  :)

2
Graphics / SFML2: font specific problem
« on: March 27, 2010, 09:28:16 am »
Nice, thanks for working on it so quickly.
I compiled the new version and it's indeed working fine now.
Good job  :)

3
Graphics / SFML2: font specific problem
« on: March 26, 2010, 09:15:17 am »
Thanks for looking into it.
At least it's reproducible :lol:

I'm puzzled now I did some test with two other fonts, one for Korean and one for Chinese characters, and they both can also display the \u3082 Japanese character even at lower size than 23.
Another font (all of the MS packages btw) for Japanese called msmincho however has the same problem as the msgothic.

If you can't find such flag or function maybe I'll consider reporting it. I think I'll also just ask google to see if other people had such a problem with FreeType already since those fonts are quite common on windows for displaying Japanese text.

EDIT: After some research I found someone who had the exact same problem only some week ago with FreeType and those fonts.
http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?p=218421#218665
So if I understand it right those two font files only have a monochrome version of the font and while loading them it fails.
Is that a FreeType bug or something you can also handle inside the SFML2 code?

4
Graphics / SFML2: font specific problem
« on: March 26, 2010, 08:00:36 am »
Yeah it's a windows font but part of the "Asian (at least Japanese) Language Package" or something, you can probably install it if you have a windows CD.
Anyway I'll upload it but guess I'll give you the link via PM since as you noticed it's not free.

5
Graphics / SFML2: font specific problem
« on: March 26, 2010, 07:05:19 am »
Hi,

when I try to compile this I get an "no matching function for call to" error message.
As "note" it's telling me only this candiate "bool sf::Font::LoadFromFile(const std::string&)".
I was also wondering at first but it looks like due to the change of how Text is rendered you only set the size at sf::Text now (in SFML2).

6
Graphics / SFML2: font specific problem
« on: March 26, 2010, 02:51:17 am »
sure, here


Code: [Select]
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

int main(int argc, char* argv[])
{
sf::Font       MyFont;
sf::Text      _namelabel;

sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Sample");

MyFont.LoadFromFile("msgothic.ttc");
_namelabel = sf::Text(L"\u3082", MyFont, 22);

while (App.IsOpened())
{
sf::Event Event;


while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();

}
App.Clear(sf::Color(0, 0, 0));
_namelabel.SetPosition(10,10);
App.Draw(_namelabel);
App.Display();
}

return EXIT_SUCCESS;
}

Same result for me.
Maybe I should add that I use code::blocks (mingw), windows7 and use a dll version (not static).
Changed the font to the ttc version here since the ttfs might not be available for everyone.

7
Graphics / SFML2: font specific problem
« on: March 26, 2010, 02:16:36 am »
I think the tutorial is only for SFML1.5 at the moment, isn't it?
I did change to SFML2 because SFML1.5 is limited to a certain charset and thus Japanese text didn't work per default at all I think. SFML1.5 wasn't capable to load ttc files either, for me at least.

Well but I'm not doing much, it's something like


Code: [Select]

sf::Font MyFont;
sf::String _name;
sf::Text _namelabel;
...
MyFont.LoadFromFile("msgothic-02.ttf");
_namelabel = sf::Text(_name, MyFont, 10);
App.Draw(_namelabel);

while _name is set by an argument with the type sf::String as well.
I'm also moving the _namelabel around with SetPosition but that shouldn't really matter here.

8
Graphics / SFML2: font specific problem
« on: March 26, 2010, 01:52:29 am »
As the title says it might not be SFML's fault but the behavior seems weird.
When I use msgothic.ttc or extract a ttf out of it (=it's not a ttc problem) as font, the text is not being rendered/drawn properly when the text size is below 23.
Like this white shade "effect": it should be \u3082
 >=23 shows them correctly.
It applies to both Japanese characters and ASCII.

Since Arial works with smaller sizes (but doesn't support Japanese) it looks like the problem is within msgothic even though other software including the default windows font-viewer are displaying smaller sizes of it without problem.

Will this be "fixed" or should I try to find other fonts supporting smaller sizes?
Or is it working for other people and I am just doing something wrong?

Pages: [1]