New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text rendering is ugly at small font sizes #228

Closed
lyptt opened this Issue May 24, 2012 · 65 comments

Comments

Projects
None yet
9 participants
@lyptt

lyptt commented May 24, 2012

It seems the text rendering APIs available in SFML 2.0 currently aren't able to render text with enough hinting to be legible at lower resolutions. Having text < 20pt is a must for some areas of my interface elements I'm making with SFML, so this is a large issue at the moment.

Here's an example of what I'm talking about:
Example of bad text rendering

It seems SFML does have some kind of support for bitmap fonts, it's stated on the website as a feature: "Easy manipulation of graphical text through bitmap fonts". I can't seem to find anything in the documentation about this though, does this feature really exist?

It'd be nice if one of the solutions was approached, either the inbuilt font rendering being worked on to be more capable, or bitmap font support being added so those that do wish to use small fonts can do so without rendering issues.

Ironically it seems that even at 40pt the rendering engine can't handle some of the more fine hinting required by the current font I'm using, this can be seen in the 'i' of Exception, and various rounded edges of the 'rounder' letters like 'p' and 'o'.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila May 24, 2012

Member

What OS, and what font? Have you tested other fonts and OSes?

Remember that some hinting methods are patented, and therefore not usable by default in SFML (in FreeType, in fact).

Member

LaurentGomila commented May 24, 2012

What OS, and what font? Have you tested other fonts and OSes?

Remember that some hinting methods are patented, and therefore not usable by default in SFML (in FreeType, in fact).

@lyptt

This comment has been minimized.

Show comment
Hide comment
@lyptt

lyptt May 24, 2012

I'm on OS X, I haven't tried other OSes but considering OS X makes use of freetype for the entirety of its font rendering I doubt the OS is the issue here, and more likely the issue is the way in which freetype is being used.

From further testing I've narrowed down the issue to be to do with using TTF based fonts. If I load OTF fonts I can make use of them at any size and they render perfectly.

I think the problem may be to do with the TTF format's inherent lack of any advanced hinting information, without it freetype basically just makes it up as it goes along, so the issue here would be freetype's auto-hinting. I think this is overridden when using fonts that feature their own, like in the case of using the OTF format.

lyptt commented May 24, 2012

I'm on OS X, I haven't tried other OSes but considering OS X makes use of freetype for the entirety of its font rendering I doubt the OS is the issue here, and more likely the issue is the way in which freetype is being used.

From further testing I've narrowed down the issue to be to do with using TTF based fonts. If I load OTF fonts I can make use of them at any size and they render perfectly.

I think the problem may be to do with the TTF format's inherent lack of any advanced hinting information, without it freetype basically just makes it up as it goes along, so the issue here would be freetype's auto-hinting. I think this is overridden when using fonts that feature their own, like in the case of using the OTF format.

@lyptt

This comment has been minimized.

Show comment
Hide comment
@lyptt

lyptt May 24, 2012

Just a quick update, it looks like even on some OTFs the issue remains, it seems the more narrow fonts seem to at the lower sizes end up looking like this. It doesn't seem to always be the case though, as using fonts like Lucida Console at 14pt also end up looking very blurry and hard to read.

lyptt commented May 24, 2012

Just a quick update, it looks like even on some OTFs the issue remains, it seems the more narrow fonts seem to at the lower sizes end up looking like this. It doesn't seem to always be the case though, as using fonts like Lucida Console at 14pt also end up looking very blurry and hard to read.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila May 24, 2012

Member

Have you tried the same font at the same size in another program (a text editor, or whatever)?

Member

LaurentGomila commented May 24, 2012

Have you tried the same font at the same size in another program (a text editor, or whatever)?

@lyptt

This comment has been minimized.

Show comment
Hide comment
@lyptt

lyptt May 24, 2012

Yup, perfectly fine

lyptt commented May 24, 2012

Yup, perfectly fine

@lyptt

This comment has been minimized.

Show comment
Hide comment
@lyptt

lyptt May 24, 2012

Here's a sample of the font used in the picture above as it should look with proper hinting:
Better example

lyptt commented May 24, 2012

Here's a sample of the font used in the picture above as it should look with proper hinting:
Better example

@ghost ghost assigned LaurentGomila May 24, 2012

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 9, 2012

Member

Could you please give a link to the font you were using in the screenshots? And can you give the corresponding pixel size (i.e. what you passed to Text::setCharacterSize), not point sizes?

Member

LaurentGomila commented Aug 9, 2012

Could you please give a link to the font you were using in the screenshots? And can you give the corresponding pixel size (i.e. what you passed to Text::setCharacterSize), not point sizes?

@lyptt

This comment has been minimized.

Show comment
Hide comment
@lyptt

lyptt Aug 9, 2012

It doesn't matter what font it is, they all look like crap at small sizes

lyptt commented Aug 9, 2012

It doesn't matter what font it is, they all look like crap at small sizes

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 9, 2012

Member

Yes I know, but it's for testing. Before starting to investigate, I must make sure that I have the exact same results as in your screenshots. This is also a way to verify that there was no mistake in your code.

Member

LaurentGomila commented Aug 9, 2012

Yes I know, but it's for testing. Before starting to investigate, I must make sure that I have the exact same results as in your screenshots. This is also a way to verify that there was no mistake in your code.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Apr 27, 2013

Member

Since there's only one user involved in this issue, and he didn't want to go further with the investigations, I close it. Don't hesitate to reply if it should be reopened.

Member

LaurentGomila commented Apr 27, 2013

Since there's only one user involved in this issue, and he didn't want to go further with the investigations, I close it. Don't hesitate to reply if it should be reopened.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup May 21, 2013

EDIT: updated screenshots
Im also experiencing this. I am in the process of moving a project from SDL to SFML (good work!). But SDL anti aliasing is more crisp, and handles small fonts (at least the ones i tried) better.
This is what trebuchet looks like rendered at 10px and 50px in SDL (top) and SFML. The SFML versions are more narrow as if a dash of scaling was applied. To my understanding both libraries use freetype to render fonts, which is why i'm surprised there's a difference.
screen shot 2013-05-21 at 15 13 18

screen shot 2013-05-21 at 13 53 56

myrup commented May 21, 2013

EDIT: updated screenshots
Im also experiencing this. I am in the process of moving a project from SDL to SFML (good work!). But SDL anti aliasing is more crisp, and handles small fonts (at least the ones i tried) better.
This is what trebuchet looks like rendered at 10px and 50px in SDL (top) and SFML. The SFML versions are more narrow as if a dash of scaling was applied. To my understanding both libraries use freetype to render fonts, which is why i'm surprised there's a difference.
screen shot 2013-05-21 at 15 13 18

screen shot 2013-05-21 at 13 53 56

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila May 21, 2013

Member

Although SFML and SDL both use the FreeType library, there are several internal options that can change the way glyphs are rendered. I can't compare sources to find out what differences there are (I have other things to work on), so if you want to investigate you're welcome ;)

And of course I reopen the issue.

Member

LaurentGomila commented May 21, 2013

Although SFML and SDL both use the FreeType library, there are several internal options that can change the way glyphs are rendered. I can't compare sources to find out what differences there are (I have other things to work on), so if you want to investigate you're welcome ;)

And of course I reopen the issue.

@LaurentGomila LaurentGomila reopened this May 21, 2013

@ghost ghost assigned LaurentGomila May 21, 2013

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup May 21, 2013

Cool. For now I'll try to find a font that renders nicely with SFML, But if i'm not satisfied I will look into the glyph parameters. Either way I will post my findings here. Thanks for the good work!

myrup commented May 21, 2013

Cool. For now I'll try to find a font that renders nicely with SFML, But if i'm not satisfied I will look into the glyph parameters. Either way I will post my findings here. Thanks for the good work!

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 7, 2013

Update on the SDL vs SFML font rendering: Without knowing the inner workings of the frameworks, I'll share my two cents on why this problem could be occurring.
It seems loading a font in SDL is done per point size, whereas in SFML a font is loaded regardless of the font size and then rendered (scaled?) to point size, which explains the uglyness (which looks terrible for large scaling deltas).

myrup commented Aug 7, 2013

Update on the SDL vs SFML font rendering: Without knowing the inner workings of the frameworks, I'll share my two cents on why this problem could be occurring.
It seems loading a font in SDL is done per point size, whereas in SFML a font is loaded regardless of the font size and then rendered (scaled?) to point size, which explains the uglyness (which looks terrible for large scaling deltas).

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 7, 2013

Member

In SFML, glyphs are rendered to the exact size they are displayed. There's no scaling.

Member

LaurentGomila commented Aug 7, 2013

In SFML, glyphs are rendered to the exact size they are displayed. There's no scaling.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 7, 2013

Hmm. Maybe there is a bug that scales them a tiny bit, but only noticeable for small fonts. It looks very much like it is scaled, a little blurry.

I wonder why SDL has you create a font with a size instead of creating a font and then specify size when rendering (like SFML).

myrup commented Aug 7, 2013

Hmm. Maybe there is a bug that scales them a tiny bit, but only noticeable for small fonts. It looks very much like it is scaled, a little blurry.

I wonder why SDL has you create a font with a size instead of creating a font and then specify size when rendering (like SFML).

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 7, 2013

Member

Hmm. Maybe there is a bug that scales them a tiny bit, but only noticeable for small fonts. It looks very much like it is scaled, a little blurry.

FreeType supports several options when rendering glyphs. The options used by SFML render smooth (but not blurry) glyphs; maybe SDL uses the one that renders glyphs pixelated, which may look better for small sizes. I plan to add an option to enable people to switch between smooth and mono (that's how it's called) mode.

I wonder why SDL has you create a font with a size instead of creating a font and then specify size when rendering (like SFML).
Because glyphs have to be pre-rendered at a fixed size. If you pass the size (and character set) at loading time, your whole font is loaded into textures and you don't need the font file anymore. All the calculations are made at loading time, and you waste less video memory with textures.

SFML renders glyphs on the fly to make the API simpler and more flexible, but as a consequence, CPU and memory consumptions are not deterministic and less optimized.

Member

LaurentGomila commented Aug 7, 2013

Hmm. Maybe there is a bug that scales them a tiny bit, but only noticeable for small fonts. It looks very much like it is scaled, a little blurry.

FreeType supports several options when rendering glyphs. The options used by SFML render smooth (but not blurry) glyphs; maybe SDL uses the one that renders glyphs pixelated, which may look better for small sizes. I plan to add an option to enable people to switch between smooth and mono (that's how it's called) mode.

I wonder why SDL has you create a font with a size instead of creating a font and then specify size when rendering (like SFML).
Because glyphs have to be pre-rendered at a fixed size. If you pass the size (and character set) at loading time, your whole font is loaded into textures and you don't need the font file anymore. All the calculations are made at loading time, and you waste less video memory with textures.

SFML renders glyphs on the fly to make the API simpler and more flexible, but as a consequence, CPU and memory consumptions are not deterministic and less optimized.

@mnemotic

This comment has been minimized.

Show comment
Hide comment
@mnemotic

mnemotic Aug 7, 2013

FYI, all patents relating to hinting methods that are used in FreeType have expired since May 2010.

mnemotic commented Aug 7, 2013

FYI, all patents relating to hinting methods that are used in FreeType have expired since May 2010.

@vonj

This comment has been minimized.

Show comment
Hide comment
@vonj

vonj Aug 7, 2013

On 2013-08-07 21:00, Martinsh Shaiters wrote:

FYI, all patents relating to hinting methods that are used in FreeType have expired since May 2010.


Reply to this email directly or view it on GitHub:
#228 (comment)

And MP3 patents have expired in most of the world since 2012. :-) In the
US the last MP3 patent expire somewhere between 2015-2017. (According to
Wikipedia.)

vonj commented Aug 7, 2013

On 2013-08-07 21:00, Martinsh Shaiters wrote:

FYI, all patents relating to hinting methods that are used in FreeType have expired since May 2010.


Reply to this email directly or view it on GitHub:
#228 (comment)

And MP3 patents have expired in most of the world since 2012. :-) In the
US the last MP3 patent expire somewhere between 2015-2017. (According to
Wikipedia.)

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 7, 2013

Member

And MP3 patents have expired in most of the world since 2012

This is an interesting point, but please avoid off-topic replies.

Member

LaurentGomila commented Aug 7, 2013

And MP3 patents have expired in most of the world since 2012

This is an interesting point, but please avoid off-topic replies.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 8, 2013

Hey Laurent. I've attempted to setup a build environment to test if switching to mono fixes the problem, but I'm getting a lot of errrors in my vs 2012 env. If you would like me to test whether a mono/smooth switch will fix this issue, you could consider making a CSFML graphics Visual C++ / GCC - 32 bits build with glyphs set to mono for me to test with. I will provide feedback!

myrup commented Aug 8, 2013

Hey Laurent. I've attempted to setup a build environment to test if switching to mono fixes the problem, but I'm getting a lot of errrors in my vs 2012 env. If you would like me to test whether a mono/smooth switch will fix this issue, you could consider making a CSFML graphics Visual C++ / GCC - 32 bits build with glyphs set to mono for me to test with. I will provide feedback!

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 8, 2013

Member

Compiling SFML is straight-forward. What's your problem?

Member

LaurentGomila commented Aug 8, 2013

Compiling SFML is straight-forward. What's your problem?

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 8, 2013

Not really sure where to start. I get 565 errors. Looks like linker errors.

myrup commented Aug 8, 2013

Not really sure where to start. I get 565 errors. Looks like linker errors.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 8, 2013

(When trying to compile csfml with vs 2012)

myrup commented Aug 8, 2013

(When trying to compile csfml with vs 2012)

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 8, 2013

Member

Is it like the linker cannot find any SFML function?
Does CMake output any error or warning?
Do you compile CSFML dynamically (static CSFML wouldn't work if used with a C linker)?

Member

LaurentGomila commented Aug 8, 2013

Is it like the linker cannot find any SFML function?
Does CMake output any error or warning?
Do you compile CSFML dynamically (static CSFML wouldn't work if used with a C linker)?

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 8, 2013

cmake gui output:
Found SFML 2.0 in C:/Users/myl/Desktop/SFML-master-2/include
Configuring done
Generating done

From there on i did nothing but open csfml.sln and build. What am I missing?

myrup commented Aug 8, 2013

cmake gui output:
Found SFML 2.0 in C:/Users/myl/Desktop/SFML-master-2/include
Configuring done
Generating done

From there on i did nothing but open csfml.sln and build. What am I missing?

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 11, 2013

Member

Mono mode is better, but indeed SDL still looks cleaner. Thanks for the screenshots.

Member

LaurentGomila commented Aug 11, 2013

Mono mode is better, but indeed SDL still looks cleaner. Thanks for the screenshots.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 11, 2013

The 200% scaling that slipped my checks are related to my retina display and running inside a vm, I thought you meant github had processed the images. Hold on, I'll make some clean 100% ones for you :)

myrup commented Aug 11, 2013

The 200% scaling that slipped my checks are related to my retina display and running inside a vm, I thought you meant github had processed the images. Hold on, I'll make some clean 100% ones for you :)

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Aug 11, 2013

Member

Just one more note: Keep in mind that this can also depend a bit on your actual screen, it's pixel density, etc. E.g. Windows' Cleartype rendering has several variables you can adjust to get a (for you) clean look. In general: I'd like to see this as a configurable feature (in sf::Font?) so you can have both behaviours. E.g. in a HD game I'd prefer smoothed text, whereas in a pixel style game I'd prefer no antialiasing.

Member

MarioLiebisch commented Aug 11, 2013

Just one more note: Keep in mind that this can also depend a bit on your actual screen, it's pixel density, etc. E.g. Windows' Cleartype rendering has several variables you can adjust to get a (for you) clean look. In general: I'd like to see this as a configurable feature (in sf::Font?) so you can have both behaviours. E.g. in a HD game I'd prefer smoothed text, whereas in a pixel style game I'd prefer no antialiasing.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 11, 2013

Here are the clean ones:
http://myl.dk/SFMLTextRenderingIssuesNoScaling.zip
SFML with ft_render_mode_normal:
sfml ft_render_mode_normal
SFML with ft_render_mode_mono:
sfml ft_render_mode_mono
SDL:
sdl

myrup commented Aug 11, 2013

Here are the clean ones:
http://myl.dk/SFMLTextRenderingIssuesNoScaling.zip
SFML with ft_render_mode_normal:
sfml ft_render_mode_normal
SFML with ft_render_mode_mono:
sfml ft_render_mode_mono
SDL:
sdl

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 11, 2013

Member

Must be something about hinting: characters are really rendered differently; look at the 'e' for example.

Member

LaurentGomila commented Aug 11, 2013

Must be something about hinting: characters are really rendered differently; look at the 'e' for example.

@retep998

This comment has been minimized.

Show comment
Hide comment
@retep998

retep998 Aug 11, 2013

Are you sure that is the exact same font at the exact same size? I'm bewildered at how different they are.

retep998 commented Aug 11, 2013

Are you sure that is the exact same font at the exact same size? I'm bewildered at how different they are.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 11, 2013

Agreed that there is a huge difference. The font is MS Trebuchet and the same sizes (just re-verified) is passed to SDL and SFML. I can't say if SDL or SFML does any magic to the size from there on before passing to ft, but the differences are too big to just be size related.

I get similar differences using a different font. Let me know if you need any other screenshots.

It really seems there's a lot of lost potential in the way SFML renders text. I will be one happy developer when it gets prettier :)

myrup commented Aug 11, 2013

Agreed that there is a huge difference. The font is MS Trebuchet and the same sizes (just re-verified) is passed to SDL and SFML. I can't say if SDL or SFML does any magic to the size from there on before passing to ft, but the differences are too big to just be size related.

I get similar differences using a different font. Let me know if you need any other screenshots.

It really seems there's a lot of lost potential in the way SFML renders text. I will be one happy developer when it gets prettier :)

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 11, 2013

Member

the same sizes (just re-verified) is passed to SDL and SFML

SFML uses pixels, SDL uses points; did you do the conversion?

Member

LaurentGomila commented Aug 11, 2013

the same sizes (just re-verified) is passed to SDL and SFML

SFML uses pixels, SDL uses points; did you do the conversion?

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 11, 2013

Member

Did you set custom font parameters with SDL, or did you just open the font and render glyphs with all the default parameters?

Member

LaurentGomila commented Aug 11, 2013

Did you set custom font parameters with SDL, or did you just open the font and render glyphs with all the default parameters?

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 11, 2013

I did not do a point to pixel conversion, no, so I guess this accounts for some of the difference.

No custom font parameters with SDL.

myrup commented Aug 11, 2013

I did not do a point to pixel conversion, no, so I guess this accounts for some of the difference.

No custom font parameters with SDL.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 11, 2013

Member

Can you please tell me which font and size (both SFML and SDL) you used for these screenshots?

I tried SDL_ttf (latest sources, using SDL 2) and got the same ugly results as SFML. The font is "sansation.ttf" (the same that is used in SFML examples) and size is 12. The strange thing is, the result was the same size in both cases, although the size is interpreted differently (12 pixels should be equal to 8 points). But that's a different issue...

And by the way, I think I've finally found something to improve quality in SFML ;)

Member

LaurentGomila commented Aug 11, 2013

Can you please tell me which font and size (both SFML and SDL) you used for these screenshots?

I tried SDL_ttf (latest sources, using SDL 2) and got the same ugly results as SFML. The font is "sansation.ttf" (the same that is used in SFML examples) and size is 12. The strange thing is, the result was the same size in both cases, although the size is interpreted differently (12 pixels should be equal to 8 points). But that's a different issue...

And by the way, I think I've finally found something to improve quality in SFML ;)

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 11, 2013

The "New Tracks" text in the left column is size 15 passed to SDL and SFML without any conversions. The font is MS Trebuchet (c:\windows\fonts\trebuc.ttf). I am thrilled this issue gets attention! Thank you!

myrup commented Aug 11, 2013

The "New Tracks" text in the left column is size 15 passed to SDL and SFML without any conversions. The font is MS Trebuchet (c:\windows\fonts\trebuc.ttf). I am thrilled this issue gets attention! Thank you!

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 11, 2013

The same shots with sansation.ttf:
SFML ft_render_mode_normal:
sfml
SDL:
sdl
Although better, still lots of blurry parts. Take a look at the "H" in "Can't Hold Us" top text in center column. Very blurry middle line.

myrup commented Aug 11, 2013

The same shots with sansation.ttf:
SFML ft_render_mode_normal:
sfml
SDL:
sdl
Although better, still lots of blurry parts. Take a look at the "H" in "Can't Hold Us" top text in center column. Very blurry middle line.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 12, 2013

Member

Did you use bold style? Your version is definitely bolder than mine.

Member

LaurentGomila commented Aug 12, 2013

Did you use bold style? Your version is definitely bolder than mine.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 12, 2013

You're saying my SFML rendered text is bolder than yours? There is no bold styling involved.
The screenshots above were taken on win8. Here is a win7 screenshot:
screen shot 2013-08-12 at 18 31 58

myrup commented Aug 12, 2013

You're saying my SFML rendered text is bolder than yours? There is no bold styling involved.
The screenshots above were taken on win8. Here is a win7 screenshot:
screen shot 2013-08-12 at 18 31 58

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 12, 2013

That was SDL, sorry. I'll have an SFML win7 shot with you in a jiffy.

myrup commented Aug 12, 2013

That was SDL, sorry. I'll have an SFML win7 shot with you in a jiffy.

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 12, 2013

My SFML win7:
screen shot 2013-08-12 at 18 42 46

myrup commented Aug 12, 2013

My SFML win7:
screen shot 2013-08-12 at 18 42 46

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 12, 2013

Member

No, I said your SDL version is bolder (sorry it was not clear).

But nevermind, I found the difference; I got the same results as you by adding TTF_SetFontHinting(font, TTF_HINTING_LIGHT);. You must have a version of FreeType or SDL_ttf in which it is the default.

I'll implement the modification in SFML as soon as possible. The result should be the exact same as in SDL after this change.

Member

LaurentGomila commented Aug 12, 2013

No, I said your SDL version is bolder (sorry it was not clear).

But nevermind, I found the difference; I got the same results as you by adding TTF_SetFontHinting(font, TTF_HINTING_LIGHT);. You must have a version of FreeType or SDL_ttf in which it is the default.

I'll implement the modification in SFML as soon as possible. The result should be the exact same as in SDL after this change.

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 12, 2013

Member

It's done. As a bonus, pixelated fonts don't look blurry anymore with this modification.

Thank you so much for all your help :)

Member

LaurentGomila commented Aug 12, 2013

It's done. As a bonus, pixelated fonts don't look blurry anymore with this modification.

Thank you so much for all your help :)

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 12, 2013

AWESOME! I will test and post a screenshot in a second :)

myrup commented Aug 12, 2013

AWESOME! I will test and post a screenshot in a second :)

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 12, 2013

Oh I am one very happy panda. Everybody will be clapping their hands!
SFML FT_RENDER_MODE_NORMAL, FT_LOAD_TARGET_LIGHT:
sfml ft_render_mode_normal target_light
SFML FT_RENDER_MODE_MONO, FT_LOAD_TARGET_LIGHT:
sfml ft_render_mode_mono target_light

myrup commented Aug 12, 2013

Oh I am one very happy panda. Everybody will be clapping their hands!
SFML FT_RENDER_MODE_NORMAL, FT_LOAD_TARGET_LIGHT:
sfml ft_render_mode_normal target_light
SFML FT_RENDER_MODE_MONO, FT_LOAD_TARGET_LIGHT:
sfml ft_render_mode_mono target_light

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Aug 12, 2013

Member

Actually I didn't use FT_LOAD_TARGET_LIGHT, but FT_LOAD_FORCE_AUTOHINT combined to FT_LOAD_TARGET_NORMAL (FT_LOAD_TARGET_LIGHT forces the autohint flag, that's why it looks good too).

Member

LaurentGomila commented Aug 12, 2013

Actually I didn't use FT_LOAD_TARGET_LIGHT, but FT_LOAD_FORCE_AUTOHINT combined to FT_LOAD_TARGET_NORMAL (FT_LOAD_TARGET_LIGHT forces the autohint flag, that's why it looks good too).

@myrup

This comment has been minimized.

Show comment
Hide comment
@myrup

myrup Aug 12, 2013

Noted and verified it looks pretty. I'll be running with this until the next SFML release :) Thanks!

myrup commented Aug 12, 2013

Noted and verified it looks pretty. I'll be running with this until the next SFML release :) Thanks!

@Bromeon Bromeon added the resolved label Feb 6, 2014

@voltechs

This comment has been minimized.

Show comment
Hide comment
@voltechs

voltechs Jun 25, 2014

How do we use this while waiting for the next release of SFML? (When will that be? sheesh!)

voltechs commented Jun 25, 2014

How do we use this while waiting for the next release of SFML? (When will that be? sheesh!)

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Jun 25, 2014

Member

Download the latest revision from github and compile it (see the tutorial).

Member

LaurentGomila commented Jun 25, 2014

Download the latest revision from github and compile it (see the tutorial).

jcowgill added a commit to jcowgill/SFML that referenced this issue Sep 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment