News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
FL_SCREEN, monospace
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
FL_SCREEN, monospace

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?

10-25-2010 01:32 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #2
RE: FL_SCREEN, monospace

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

10-25-2010 07:34 PM
Visit this user's website Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #3
RE: FL_SCREEN, monospace

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.

This post was last modified: 10-26-2010 12:11 AM by mikshaw.

10-26-2010 12:07 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #4
RE: FL_SCREEN, monospace

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.

12-08-2010 04:01 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: