Oh, nevermind, I found the font files.On Jul 3, 2014, at 15:01 , Rick Mann <@Rick_Mann> wrote:
Thanks. How do I use SourceSans? I don’t see a plain .otf version in there.
I have FreeType 2.5.3 installed on this machine, although I’m not sure SDL 1.2 Framework is using it (I think it embeds its own FreeType).
On Jul 3, 2014, at 14:47 , mr_tawan <mr_tawan at hotmail.com> wrote:
Indeed it looks pretty bad on the small text.
Here I use HelveticaNeue-Regular you posted on the top, SourceSansPro-Regular.ttf, and then SourceSansPro-Regular.otf on the bottom. All of them are 16 point height.
The otf varient is drawn slightly different due to the FreeType2 2.5 which includes Adobe’s rasterizer, the ttf verrsion uses old rasterizer. I think if you’re using FreeType 2 below version 2.4.12, the output would be on par or even worse than ttf version though.
You can get source sans pro from http://sourceforge.net/projects/sourcesans.adobe/
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Rick
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Rick
Hmm. I tried SourceSansPro Regular and Bold. Unfortunately, the inter-numeral kerning is still imperfect (5 abuts the previous glyph too closely), and the numerals aren’t constant width. The “4” is wider than the rest, causing strings of numbers to shift as they change.
http://cl.ly/image/1S0q3B2g0u0y/SourceSansPro.pngOn Jul 3, 2014, at 14:47 , mr_tawan <mr_tawan at hotmail.com> wrote:
Indeed it looks pretty bad on the small text.
Here I use HelveticaNeue-Regular you posted on the top, SourceSansPro-Regular.ttf, and then SourceSansPro-Regular.otf on the bottom. All of them are 16 point height.
The otf varient is drawn slightly different due to the FreeType2 2.5 which includes Adobe’s rasterizer, the ttf verrsion uses old rasterizer. I think if you’re using FreeType 2 below version 2.4.12, the output would be on par or even worse than ttf version though.
You can get source sans pro from http://sourceforge.net/projects/sourcesans.adobe/
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Rick
I mean the problem is there also in SDL2 with this font and latest SDL_ttf.
If you get it solve for SDL2, very likely, it will be solved for SDL1.2 as well.
I am not sure about monospaced font. it worth a try…
Well, I tried it with Verdana. Seems to work well. I also tried SourceSansPro, but it had similar (although less severe problems). I may just stick with Verdana from now on out.On Jul 3, 2014, at 12:41 , Sylvain Becker <sylvain.becker at gmail.com> wrote:
–
Rick
Just noticed that you mentioned ‘monospace’ font. There’s a monospace variant of source says pro called ‘source code pro’.
Give it a try.
Rick, I am not an expert of FT, but here’s what I found.
When using size 12, the ‘n’ gets a bad “horiBearingY” value from
freetype (at least compared to the ‘u’).
This is the Y offset, when writing in horizontal layout.
See:
http://www.freetype.org/freetype2/docs/glyphs/
http://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html
If you use a different size (11 or 13), you get better result because
the “horiBearingY” of ‘u’ and ‘n’ are equals
But it seems that if the font get loaded with different hint flags,
you have also better result.
So after loading the font, you can use:
TTF_SetFontHinting(font, TTF_HINTING_LIGHT);
Cheers,
SylvainOn Fri, Jul 4, 2014 at 9:45 AM, mr_tawan <mr_tawan at hotmail.com> wrote:
Just noticed that you mentioned ‘monospace’ font. There’s a monospace
variant of source says pro called ‘source code pro’.
Give it a try.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Sylvain Becker
I didn’t want a fully monospaced font, just one where the numerals and decimal point are all the same width. Source doesn’t seem to meet this criteria. Helvetica also doesn’t, but Helvetica Neue does (but has other problems).
Verdana is going to work for me, though, and doesn’t exhibit those problems.On Jul 4, 2014, at 00:45 , mr_tawan <mr_tawan at hotmail.com> wrote:
Just noticed that you mentioned ‘monospace’ font. There’s a monospace variant of source says pro called ‘source code pro’.
Give it a try.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Rick
Thanks, Sylvain, I’ll keep that in mind.On Jul 4, 2014, at 02:47 , Sylvain Becker <sylvain.becker at gmail.com> wrote:
Rick, I am not an expert of FT, but here’s what I found.
When using size 12, the ‘n’ gets a bad “horiBearingY” value from
freetype (at least compared to the ‘u’).
This is the Y offset, when writing in horizontal layout.
See:
http://www.freetype.org/freetype2/docs/glyphs/
http://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html
If you use a different size (11 or 13), you get better result because
the “horiBearingY” of ‘u’ and ‘n’ are equals
But it seems that if the font get loaded with different hint flags,
you have also better result.
So after loading the font, you can use:
TTF_SetFontHinting(font, TTF_HINTING_LIGHT);
Cheers,
Sylvain
On Fri, Jul 4, 2014 at 9:45 AM, mr_tawan <mr_tawan at hotmail.com> wrote:
Just noticed that you mentioned ‘monospace’ font. There’s a monospace
variant of source says pro called ‘source code pro’.
Give it a try.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Sylvain Becker
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Rick