SFML community forums
Help => Graphics => Topic started by: kol on October 26, 2013, 02:41:17 am
-
There is a way to leave the higher quality text, without using the GUI?
Or is there a Gui easy to use?
(http://i.imgur.com/nE3MMv2.png)
-
I have no idea what you're trying to ask.
Please explain what you're after and what you're getting instead and what your code is and so on and so forth.
-
I dont understand the question either.
I see though that you are using a Sasquatch sprite ripped from Ragnarok Online and you are probably aware this is illegal?
-
When using very small font, quality is being lost, how can I have the same quality photoshop?
(http://i.imgur.com/toTGFnt.png)
I will not use the sprite from ragnarok is just for testing.
-
Are you scaling the text/view or are you loading the font at the said size?
Did you move the view or set the text to floating point values?
-
Are you using SFML 2.1?
-
yes, I used the SFM 2.1. I would take this text without smoth, somehow? It may even be to the API, if you can show me examples. :)
-
Font quality is much better in latest sources.
-
Yes, but I want to use without smoothing.
-------------------------------------------------------------------
Solved, for those who need to do the following:
Font.hpp.
Add Prototype:
void Font2(bool render);
and variable:
bool render2;
Font.cpp.
Add Prototype:
void Font::Font2(bool render)
{
render2 = render;
}
Line: 72, Font.cpp.
Normal:
Font::Font() :
m_library (NULL),
m_face (NULL),
m_streamRec(NULL),
m_refCount (NULL)
{
}
For
Font::Font() :
m_library (NULL),
m_face (NULL),
m_streamRec(NULL),
m_refCount (NULL)
{
render2 =true; //Add
}
Line: 408, Font.cpp.
Replace:
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_NORMAL, 0, 1);
For
// Convert the glyph to a bitmap (i.e. rasterize it)
if(render2){
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_NORMAL, 0, 1);
}else{
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_MONO, 0, 1);
}
Used:
sf::font Arial;
Arial.Font2(false);
if (!Tahoma.loadFromFile("D:/Windows/Fonts/Arial.ttf")){
//Error
}
(http://i.imgur.com/SqcAMYQ.png)
-
... or use latest sources ...
-
Sorry, Had not understood.