Author Topic: fontheight and a question about user resizable windows  (Read 2797 times)

Ed Davis

  • Guest
fontheight and a question about user resizable windows
« on: March 27, 2014, 01:10:03 PM »
1) I want to write some text to a Window.  I'd like to know how much I can fit, so I was thinking I would use fontheight to determine the height of the font.  But fontheight requires a fontnumber.  After opening a window, how do I determine the fontnumber?

2) Is there a way to create a user-resizable window in EGSL?

Thanks!

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: fontheight and a question about user resizable windows
« Reply #1 on: March 27, 2014, 05:12:50 PM »
1. First you have to load a font (bitmap font) like this:
Code: [Select]
myfont = loadbmpfont (filename, lines, rows, fontface)The variable myfont holds the fontnumber. So you can access it by using e.g.
Code: [Select]
fheight=fontheight (myfont)If you are using a monofont, use monoheight instead.

2. Nope that's not possible. Of course you can make a menu or something where one can choose the size, then use
Code: [Select]
resizewindow (x,y)