Page 1 of 1

RESOLVED Q2 - Surface-Font trouble

PostPosted: Mon Jan 16, 2012 1:27 pm
by D.Bane
Hi, again :)

I got used to the surface and watching the code. I can not even believe that I would prefer it over the GUI. The only problem for now that I have is the Font object and surface...

In the splash class I wanted to use surface.WriteTextf(), surface.CenterTextf(), I even tried printf() just to make sure it does not work... The reason I wanted to use them is that I wanted to make the First letter be capital letter, but bigger then the rest of the letters. So instead of "ECERE" you get something more resembling "Ecere".

For example, I know how to change the color of the font, but I would like to know how can I make some part of the text that is written on the form bold, and some of different size.

When I tried to change the font of the Form1 form1{} I got all the text bold, or all of the text changed in size.

Is there a way to influence the font just like surface.SetForeground(color)..so something like setFontButNotForAll() which would change the font used to write on the surface, but it will not change the main font of the Window class. In short, to work just like the surface.SetForeground(color);

Thank you and best regards,
D.Bane.

Re: Q2 - Surface-Font trouble

PostPosted: Sat Feb 04, 2012 3:29 am
by jerome
You will find the answer to this in the original Splash screen thread.
It is the distinction between FontResource and the Surface's drawing Font object.
It is possible to use other FontResource than the window's default font.

Re: Q2 - Surface-Font trouble

PostPosted: Wed Feb 08, 2012 8:21 am
by D.Bane
Hi,

Yes, I took a look at your response to the splash control and I like the Fonts part as well as other insights into the Ecere.

Thank you.
D.Bane.