Murga-Projects Forums
FL_SCREEN, monospace - Printable Version

+- Murga-Projects Forums (
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: FL_SCREEN, monospace (/showthread.php?tid=393)

FL_SCREEN, monospace - mikshaw - 10-25-2010 01:32 AM

I just noticed that my current Debian system does not display FL_SCREEN font any differently than FL_HELVETICA. When I was using a non-Xft version of murgaLua, I had set the fltk.font X resource to terminus, which made FL_HELVETICA monospace. That was fine for me, since I'm accustomed to seeing fixed-width fonts all the time anyway. Now using the standard version of murgaLua with scalable fonts, my X resources are ignored (understandably), but I never noticed until today that FL_SCREEN does not use a fixed-width font as I expected it would. In order to fix that, I add Fl:set_font(fltk.FL_SCREEN, "Terminus") to use my favorite fixed-width font. But this would obviously not translate to most other systems, since Terminus is not generally installed by default. I thought of replacing "Terminus" with "monospace", and it does indeed use a fixed-width font from my system (not sure which one). I'm guessing "monospace" is a pretty universal and generic font name. My question is, how universal is it? If the command Fl:set_font(fltk.FL_SCREEN, "monospace") is used on an arbitrarily chosen Win or Mac, would it guarantee a fix-width font when using FL_SCREEN?

RE: FL_SCREEN, monospace - JohnMurga - 10-25-2010 07:34 PM

I have no idea ... I'll go over to the FLTK forums and ask :-)

RE: FL_SCREEN, monospace - mikshaw - 10-26-2010 12:07 AM

I thought it might be more effective to use some less specific source, since I think this is more of an operating system matter than a FLTK one.
For example, someone who has an essentially vanilla Windows or Mac system could, in theory, check if "monospace" is a valid font name on that system. I'd be willing to bet that if one Windows system has a font specifically named "monospace", then they all do.

On a separate thread, it seems that using monospace in Fl_Text_Display on my system I end up with a font that doesn't actually fit within the lines, so I went back to using Terminus anyway.

RE: FL_SCREEN, monospace - mikshaw - 12-08-2010 04:01 AM

John: You didn't point out the fact that I had forgotten Fltk has FL_COURIER and FL_COURIER_BOLD. I've been thinking for months that FL_SCREEN is what Fltk uses for monospace. That should teach me not to go a whole summer without coding.