News:

*NEW* Current Version on STEAM16.793

Webchat:
Visit the chat



real font

Previous topic - Next topic

Jonás Perusquía

hi, i make this suggestion having in mind it is possible and easy to implement, however i dont know if it really is...

i suggest real font for GLBasic

just like:

Code (glbasic) Select
LOADFONT "Comic Sans MS", 1
SETFONT 1
SETFONTSIZE 18
PRINT *"Hello "* + "Hello"

* = bold
result:

Hello Hello
<HTML><BASIC><EC>
Be free and do good things

fuzzy70

The problem with that is cross platform compatibility. Comic Sans MS may be on windows machines but what about iPad/iPhone/Cannoo/Android etc etc. Some may not even know what a Truetype font is so a font rasterizer would have to be written for that target plus other problems.

I am pretty sure that is why GLBasic uses it's current method of using bitmap fonts for ease of portability. There are some code examples in the forum that give extra features & control over text. Ignore my one as there are better ones posted  :D

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Jonás Perusquía

but a real font could not be imported?

for example add to "media" folder the font.ttf

and LOADFONT "font.ttf"


so you can use your own "realfont"

and change size of the text with SETFONTSIZE 18
<HTML><BASIC><EC>
Be free and do good things

fuzzy70

While it is simple for Windows & the other platforms that support .ttf, adding support for the other platforms may not be so easy like I said in my last post.

Different commands would probably need to be added so to not interfere with the current font commands along with print etc & break existing code using bitmap fonts.

Making it available to just certain platforms would be a bad idea, as one of GLBasic's main strengths is all the platforms you can code for with zero or little modification.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Moru

The major benefit from using bitmap fonts is the speed. We lose UNICODE support though.