Murga-Projects Forums

Full Version: FL_SCREEN, monospace
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
I have no idea ... I'll go over to the FLTK forums and ask :-)
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.
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.
Reference URL's