GLBasic forum

Main forum => GLBasic - en => Topic started by: ampos on 2011-Mar-11

Title: Font kerning and black letters
Post by: ampos on 2011-Mar-11
I give up.

I am trying to generate a font with black text but then the font kerning does not work. I have been able to get it but without anti aliasing. The background can be white or transparent, doesn't matter.

Any idea?
Title: Re: Font kerning and black letters
Post by: MrTAToad on 2011-Mar-11
You mean you want something like the included picture ?  I used a fixedsys font with a red background and black text

For black text (RGB of 0,0,0), its slightly tricky as the default transparency value is the same.

What I used is :

Code (glbasic) Select
SETTRANSPARENCY RGB(255,0,0)
LOADFONT "smalfont.bmp",0
CLEARSCREEN RGB(255,255,255)
PRINT "Hello",0,0
SHOWSCREEN
KEYWAIT


You have to manual load the font unfortunately.

It might be easier if possible to use an RGB value of 1,1,1 or even 0,0,1

[attachment deleted by admin]
Title: Re: Font kerning and black letters
Post by: ampos on 2011-Mar-11
I will need to test later, but I want to use font KERNING:

Print "itest",0,0,0
Print "itest",0,20,1

The second itest should be shorter but I have not been able to get it working with black font.
Title: Re: Font kerning and black letters
Post by: MrTAToad on 2011-Mar-11
Should work fine with font kernalling
Title: Re: Font kerning and black letters
Post by: ampos on 2011-Mar-11
It should but in my previous tests it didn't.

No time now. Will check later.
Title: Re: Font kerning and black letters
Post by: MrTAToad on 2011-Mar-11
This is what mine looks like

[attachment deleted by admin]
Title: Re: Font kerning and black letters
Post by: ampos on 2011-Mar-12
Thank you, it worked.  :nw: