Jump to content

Font questions


AggrorJorn
 Share

Recommended Posts

I have a few questions around fonts and font sizes. According to the wiki, LE has only 1 font with fixed size available: Arial9.

http://www.leadwerks.com/wiki/index.php?title=LoadFont

 

I seem to recall from the old forum that several other fonts were supported like calibri and Tahoma. Anyway this would mean that for every different font and different size, I would have to create a new dds and ini?

Link to comment
Share on other sites

I have a few questions around fonts and font sizes. According to the wiki, LE has only 1 font with fixed size available: Arial9.

http://www.leadwerks.com/wiki/index.php?title=LoadFont

 

I seem to recall from the old forum that several other fonts were supported like calibri and Tahoma. Anyway this would mean that for every different font and different size, I would have to create a new dds and ini?

 

Suggestion:

 

You could use FontHeight and TextWidth functions to dynamically resize things

depending on current font

AV MX Linux

Link to comment
Share on other sites

I thought both of those just actually returned the height and width, not actually set them?

 

Yes. They are only returning values.

What I was thinking of that you could use those values to

resize the surroundings, like a text field height and width.

AV MX Linux

Link to comment
Share on other sites

Oops. Sorry. When i good remember, for lua exist clibs - luagl and luaglu, but i newer tried it from LE - maybe don't work becuase LE has LUA interpreter included to core of LE.

[HW] C2D Q6600, 4GB RAM, NV8800GTX, Vista Ultimate x64

[sW] Blide Plus, BlitzMax, Delphi, C++, 3DWS 5.53, Leadwerks 2.xx

 

76561197970156808.pngAndyGFX.png

Link to comment
Share on other sites

From my experience FontHeight() and TextWidth() are not returning correct values when using any font other than the Arial9 that comes with the engine. So i advise you to test the functions before you start relying on them. Maybe it has been fixed or i was wrong, dunno.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

From my experience FontHeight() and TextWidth() are not returning correct values when using any font other than the Arial9 that comes with the engine. So i advise you to test the functions before you start relying on them. Maybe it has been fixed or i was wrong, dunno.

Yes DaDonik you are right. I have now tested and they are not returning the correct values.

I found this when setting the max length of my Editboxes in my Cells C++ GUI. TextWidth return

incorrect values.

AV MX Linux

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...