AggrorJorn Posted June 19, 2010 Share Posted June 19, 2010 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? Quote Link to comment Share on other sites More sharing options...
macklebee Posted June 19, 2010 Share Posted June 19, 2010 yes, you would have to create a bitmap font if you wanted another font other than Arial9. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Roland Posted June 19, 2010 Share Posted June 19, 2010 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 Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
macklebee Posted June 19, 2010 Share Posted June 19, 2010 Suggestion: You could use FontHeight and TextWidth functions to dynamically resize things depending on current font I thought both of those just actually returned the height and width, not actually set them? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Roland Posted June 19, 2010 Share Posted June 19, 2010 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. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
AndyGFX Posted June 19, 2010 Share Posted June 19, 2010 When you need change font size, use glScalef. I know, ins't ideal, but works. Quote [HW] C2D Q6600, 4GB RAM, NV8800GTX, Vista Ultimate x64 [sW] Blide Plus, BlitzMax, Delphi, C++, 3DWS 5.53, Leadwerks 2.xx Link to comment Share on other sites More sharing options...
macklebee Posted June 19, 2010 Share Posted June 19, 2010 When you need change font size, use glScalef. I know, ins't ideal, but works. how can you use opengl commands in lua? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AndyGFX Posted June 19, 2010 Share Posted June 19, 2010 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. Quote [HW] C2D Q6600, 4GB RAM, NV8800GTX, Vista Ultimate x64 [sW] Blide Plus, BlitzMax, Delphi, C++, 3DWS 5.53, Leadwerks 2.xx Link to comment Share on other sites More sharing options...
DaDonik Posted June 20, 2010 Share Posted June 20, 2010 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. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Roland Posted June 20, 2010 Share Posted June 20, 2010 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. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
DaDonik Posted June 20, 2010 Share Posted June 20, 2010 Good to know it wasn't me Bad to know it's still broken Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 20, 2010 Author Share Posted June 20, 2010 Yes I can also confirm this. For the default arial9 it works fine. But with other fonts (including the one from the wiki) there can be a slight change in returned value. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.