On Windows and Linux, SDL_TTF is alittle different?

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text drawing with
SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

Actually it almost looks like a different font. Notice the edges are
rounded more on the Windows version (look at the top left of the
capital E next to the circle, for example), whereas on the Linux
version they’re squared. Are you using the exact same ttf file for
both?On Thu, Jun 19, 2008 at 4:35 PM, Jesse P. wrote:

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text drawing with
SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Yes, is same font for both

Jesse

Justin Coleman wrote:> Actually it almost looks like a different font. Notice the edges are

rounded more on the Windows version (look at the top left of the
capital E next to the circle, for example), whereas on the Linux
version they’re squared. Are you using the exact same ttf file for
both?

On Thu, Jun 19, 2008 at 4:35 PM, Jesse P. wrote:

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text drawing with
SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Same version of FreeType? (That’s what SDL_ttf uses to actually render.)

-bill!On Thu, Jun 19, 2008 at 06:04:52PM -0400, Jesse P. wrote:

Yes, is same font for both

Yes, same FreeType…

Its the same code too, everything is the same…
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

jesse

Bill Kendrick wrote:> On Thu, Jun 19, 2008 at 06:04:52PM -0400, Jesse P. wrote:

Yes, is same font for both

Same version of FreeType? (That’s what SDL_ttf uses to actually render.)

-bill!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It could be the hinting in the Freetype lib is enabled in one, but not
the other. This code is patented, and is usually disabled in release
builds. Maybe try recompiling the lib for both Linux and Windows,
making sure to use the same settings for both.

SteveOn June 19, 2008 8:10:55 pm Jesse P. wrote:

Yes, same FreeType…

Its the same code too, everything is the same…
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

Here’s a little more ammo if you haven’t done this yet… Zoom in on the attachment. (Do attachments work on this list?)

Jonny D> Date: Thu, 19 Jun 2008 18:04:52 -0400

From: slnthero at aol.com
To: sdl at lists.libsdl.org
Subject: Re: [SDL] On Windows and Linux, SDL_TTF is alittle different ???

Yes, is same font for both

Jesse

Justin Coleman wrote:

Actually it almost looks like a different font. Notice the edges are
rounded more on the Windows version (look at the top left of the
capital E next to the circle, for example), whereas on the Linux
version they’re squared. Are you using the exact same ttf file for
both?

On Thu, Jun 19, 2008 at 4:35 PM, Jesse P. wrote:

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text drawing with
SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_TTF_Anomaly2.bmp
Type: image/bmp
Size: 12378 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080619/81158c49/attachment.bin

Yes, I zoomed the attachment, there is definitely a difference!

Really, It is not a big issue

Again, everthing is the same…

jesse

Jonathan Dearborn wrote:> Here’s a little more ammo if you haven’t done this yet… Zoom in on

the attachment. (Do attachments work on this list?)

Jonny D


Date: Thu, 19 Jun 2008 18:04:52 -0400
From: slnthero at aol.com
To: sdl at lists.libsdl.org
Subject: Re: [SDL] On Windows and Linux, SDL_TTF is alittle
different ???

Yes, is same font for both

Jesse

Justin Coleman wrote:

Actually it almost looks like a different font. Notice the edges are
rounded more on the Windows version (look at the top left of the
capital E next to the circle, for example), whereas on the Linux
version they’re squared. Are you using the exact same ttf file for
both?

On Thu, Jun 19, 2008 at 4:35 PM, Jesse P. wrote:

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text
drawing with

SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
=




SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

Here is my code for text drawing using SDL_ttf (is something wrong with
it?):

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

///////////////////////////////////////////////////|
//
|
//
“DrawTextOnScreenBuffer”
|
//__________________________________________________________________________________________________|
void Visuals::DrawTextOnScreenBuffer(char *text, Sint32 red, Sint32
green, Sint32 blue, Sint32 alpha, Sint32 xScreenPos, Sint32 yScreenPos,
Uint8 xJustification)
{
Sint32 x, y;
int textWidth;
int textHeight;

xScreenPos += 3;

if (xJustification == TextCenter)
{
    TTF_SizeText(FntCourier, text, &textWidth, &textHeight);
    xScreenPos = (640 - textWidth) / 2;
}
else if (xJustification == TextRight)
{
    TTF_SizeText(FntCourier, text, &textWidth, &textHeight);
    xScreenPos = (640 - textWidth) - 3;
}

SDL_Color clrFg = {0 , 0 , 0, 0};
SDL_Surface *sText = TTF_RenderText_Solid( FntCourier, text, clrFg );
SDL_Rect rcDest = {xScreenPos-3, yScreenPos-3, 0, 0};
SDL_BlitSurface( sText, NULL, Screen, &rcDest );
SDL_FreeSurface(sText);

for (y = -3; y < 4; y++)
{
    for (x = -3; x < 4; x++)
    {
        sText = TTF_RenderText_Solid( FntCourier, text, clrFg );
        rcDest.x = xScreenPos+x;
        rcDest.y = yScreenPos+y;
        rcDest.w = 0;
        rcDest.h = 0;
        SDL_BlitSurface( sText, NULL, Screen, &rcDest );
        SDL_FreeSurface(sText);
    }
}

SDL_Color clrFg2 = {red , green , blue, alpha};

for (y = 0; y < 1; y++)
{
    for (x = 0; x < 1; x++)
    {
        sText = TTF_RenderText_Blended( FntCourier, text, clrFg2 );
        rcDest.x = xScreenPos+x;
        rcDest.y = yScreenPos+y;
        rcDest.w = 0;
        rcDest.h = 0;
        SDL_BlitSurface( sText, NULL, Screen, &rcDest );
        SDL_FreeSurface(sText);
    }
}

sText = TTF_RenderText_Blended( FntCourier, text, clrFg2 );
rcDest.x = xScreenPos;
rcDest.y = yScreenPos;
rcDest.w = 0;
rcDest.h = 0;
SDL_BlitSurface( sText, NULL, Screen, &rcDest );
SDL_FreeSurface(sText);

}
//__________________________________________________________________________________________________
//
|
//
“DrawTextOnScreenBuffer” |
//
|
///////////////////////////////////////////////////

Jonathan Dearborn wrote:> Here’s a little more ammo if you haven’t done this yet… Zoom in on

the attachment. (Do attachments work on this list?)

Jonny D


Date: Thu, 19 Jun 2008 18:04:52 -0400
From: slnthero at aol.com
To: sdl at lists.libsdl.org
Subject: Re: [SDL] On Windows and Linux, SDL_TTF is alittle
different ???

Yes, is same font for both

Jesse

Justin Coleman wrote:

Actually it almost looks like a different font. Notice the edges are
rounded more on the Windows version (look at the top left of the
capital E next to the circle, for example), whereas on the Linux
version they’re squared. Are you using the exact same ttf file for
both?

On Thu, Jun 19, 2008 at 4:35 PM, Jesse P. wrote:

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text
drawing with

SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
=




SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sorry, I took out the last FOR loop (was unnecessary )

JeZ+Lee

Jesse P. wrote:> Hi,

Here is my code for text drawing using SDL_ttf (is something wrong
with it?):

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

///////////////////////////////////////////////////|

//
|
//
“DrawTextOnScreenBuffer”
|
//__________________________________________________________________________________________________|

void Visuals::DrawTextOnScreenBuffer(char *text, Sint32 red, Sint32
green, Sint32 blue, Sint32 alpha, Sint32 xScreenPos, Sint32
yScreenPos, Uint8 xJustification)
{
Sint32 x, y;
int textWidth;
int textHeight;

xScreenPos += 3;

if (xJustification == TextCenter)
{
TTF_SizeText(FntCourier, text, &textWidth, &textHeight);
xScreenPos = (640 - textWidth) / 2;
}
else if (xJustification == TextRight)
{
TTF_SizeText(FntCourier, text, &textWidth, &textHeight);
xScreenPos = (640 - textWidth) - 3;
}

SDL_Color clrFg = {0 , 0 , 0, 0};
SDL_Surface *sText = TTF_RenderText_Solid( FntCourier, text, clrFg );
SDL_Rect rcDest = {xScreenPos-3, yScreenPos-3, 0, 0};
SDL_BlitSurface( sText, NULL, Screen, &rcDest );
SDL_FreeSurface(sText);

for (y = -3; y < 4; y++)
{
for (x = -3; x < 4; x++)
{
sText = TTF_RenderText_Solid( FntCourier, text, clrFg );
rcDest.x = xScreenPos+x;
rcDest.y = yScreenPos+y;
rcDest.w = 0;
rcDest.h = 0;
SDL_BlitSurface( sText, NULL, Screen, &rcDest );
SDL_FreeSurface(sText);
}
}

SDL_Color clrFg2 = {red , green , blue, alpha};

for (y = 0; y < 1; y++)
{
for (x = 0; x < 1; x++)
{
sText = TTF_RenderText_Blended( FntCourier, text, clrFg2 );
rcDest.x = xScreenPos+x;
rcDest.y = yScreenPos+y;
rcDest.w = 0;
rcDest.h = 0;
SDL_BlitSurface( sText, NULL, Screen, &rcDest );
SDL_FreeSurface(sText);
}
}

sText = TTF_RenderText_Blended( FntCourier, text, clrFg2 );
rcDest.x = xScreenPos;
rcDest.y = yScreenPos;
rcDest.w = 0;
rcDest.h = 0;
SDL_BlitSurface( sText, NULL, Screen, &rcDest );
SDL_FreeSurface(sText);
}
//__________________________________________________________________________________________________

//
|
//
“DrawTextOnScreenBuffer” |
//
|
///////////////////////////////////////////////////

Jonathan Dearborn wrote:

Here’s a little more ammo if you haven’t done this yet… Zoom in on
the attachment. (Do attachments work on this list?)

Jonny D


Date: Thu, 19 Jun 2008 18:04:52 -0400
From: slnthero at aol.com
To: sdl at lists.libsdl.org
Subject: Re: [SDL] On Windows and Linux, SDL_TTF is alittle
different ???

Yes, is same font for both

Jesse

Justin Coleman wrote:

Actually it almost looks like a different font. Notice the edges are
rounded more on the Windows version (look at the top left of the
capital E next to the circle, for example), whereas on the Linux
version they’re squared. Are you using the exact same ttf file for
both?

On Thu, Jun 19, 2008 at 4:35 PM, Jesse P. wrote:

On Windows and Linux, SDL_TTF is alittle different ???

Hi,

Please look at the following comparison:
http://silentheroproductions.com/images/SDL_TTF_Anomaly.jpg

There is a slight difference between Windows and Linux text
drawing with

SDL_TTF.
Is this a bug? I thought SDL_TTF made same text on most platforms.

Not a huge issue, but thought I would mention it here…

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
slnthero at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
=




SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org