2 registered members (AndrewAMD, chrissierra),
1,306
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
set_fontsize ( fontpointer, fontsize);
#89867
09/14/06 10:49
09/14/06 10:49
|
Joined: Nov 2004
Posts: 888
beegee
OP
User
|
OP
User
Joined: Nov 2004
Posts: 888
|
Look at the title, this would be really great. The reason why I want to have this command is, to scale truetype fonts proportional to the resolution. Any chance?
Fratch - Newer statistics panel for GameStudio
|
|
|
Re: set_fontsize ( fontpointer, fontsize);
[Re: Michael_Schwarz]
#89870
09/17/06 14:08
09/17/06 14:08
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
Hm... I don't know. Is this really necessary? You could just define multiple TTF-fonts with different sizes...
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: set_fontsize ( fontpointer, fontsize);
[Re: Thomas_Nitschke]
#89871
09/17/06 16:13
09/17/06 16:13
|
Joined: Nov 2004
Posts: 888
beegee
OP
User
|
OP
User
Joined: Nov 2004
Posts: 888
|
You're right, but it's really unhandy to set every text the other font, which has a different size. Well, with this suggestion you only need one line of code.
Edit: Sorry above doesn't operate. It's unpossible to change the font type of a text runtime. Read in the manual. So one possible would be to make for every text another texts with different font types. This means if you got many texts, it's very unhandy and take much time.
Last edited by beegee; 09/17/06 16:20.
Fratch - Newer statistics panel for GameStudio
|
|
|
Re: set_fontsize ( fontpointer, fontsize);
[Re: beegee]
#89872
09/17/06 16:55
09/17/06 16:55
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Beside that TTFs arent really resolution free. I tested it with different sizes but in comparison TTFs are everytime different on all resolutions. You can easily test it: write a text that starts at the left border of the screen and ends (nearly) directly on the right. Then change the resolution, try another size which fits the string so that it ends again at the right. Make snapshots. Than scale the lower resolution image to the size of the other one and make an overlay in your paint program: you will see that they are different in length/height or both.
TTFs are evil: they are not really resolution free and they are SLOW.
Last edited by HeelX; 09/17/06 16:56.
|
|
|
Re: set_fontsize ( fontpointer, fontsize);
[Re: HeelX]
#89873
09/17/06 21:49
09/17/06 21:49
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Agreed, that they are slow, but at least they don't look that ugly. Some days ago i started a thread, asking for bitmap font letters with different widths. That yould be good solution in my eyes.
To the topic: I don't think that something like that would be usefull. Defining several fonts is easy and fits the purpose totally from my püoint of view.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: set_fontsize ( fontpointer, fontsize);
[Re: Uhrwerk]
#89874
09/17/06 22:10
09/17/06 22:10
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Quote:
Some days ago i started a thread, asking for bitmap font letters with different widths. That yould be good solution in my eyes.
Yes, indeed. In the meanwhile you could write it on your own: just cut each letter out of a font bitmap, crop it left and right and stitch them together to render it on a bitmap.
|
|
|
Re: set_fontsize ( fontpointer, fontsize);
[Re: HeelX]
#89875
09/17/06 22:16
09/17/06 22:16
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Yes, I already spent some time thinking about writing this code for myself, but I guess in the end using ttf is the more efficient possibility.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|