[REBOL] Re: help needed from graphics GURUS ?
From: gscottjones:mchsi at: 31-Aug-2002 7:43
From: "Carl Read"
<snip>
> The problem though is REBOL doesn't come
> with a font-requester, so making a cross-platform
> app that gives access to all of a user's fonts would
> be tricky...
>
> So, a question for the others here testing the beta
> View: Does it come with a font-requester?
Hi, Carl,
Just downloaded the /View beta, and I can't find one. Maybe I don't know
exactly what to look for. I typed in "? fon" to see what words had "fon" in
them, and got the same list as current /View. I *assume* that a font
requester would have this fragment in it somewhere (call me silly).
> If not, let's make a cross-platform one. Afterall, it
> seems all we need is a block of strings containing the
> names of all the fonts on a user's system. If we've got
> that, we can make a font-requester, right?
I may not be properly understanding what you have written here, so I
apologize in advance if I have misunderstood, or if I end up showing my
ignorance yet again!
Getting the names of the font families on the system requires access to a
system resource, right? Of course, /Pro or /Command would allow one to set
up such a call, but I assume you mean truly cross platform, including the
regular
/View (aka /View/Too-Broke-Or-Cheap-To-Pay-For-Pro-Or
Possibly-Have-A-Philosophical-Beef-Against-Paying-Or-Dont-Need-Pro-Features-
But-Gee-It-Would-Be-Nice-On-Occasion). Here is where I am unsure what you
mean. (Or maybe I am just "hamstrung" from being a predominantly Windows
user!?)
I could envision a "master list" of font names, and that /View could in
theory cull through the list to find what is available. However, (and again
ignorance warning in effect,) it appears as though /View "gracefully" falls
back to a default font, if a font is not actually available. So a system
would on first bluch appear to "support" all the fonts, but in fact would
just be using default fall-backs if the actual font is not available. Maybe
there is a way to detect this event. Maybe you or another /View guru would
know this.
Outside of calling on a system resource, the only other way I can think of
to find what fonts are available on a specific machine is to use a (gulp)
non-REBOL utility to create the list for REBOL. Am I way off base on this?
Please someone save me from myself.
> So, let's say at startup View looks for a file called
> %font-names, which contains such a block. If it
> doesn't find it, it runs an os-specific script to grab
> the names of the fonts on the system and saves them
> as a block to %font-names.
So, (somewhat redundantly) is this "os-specific" script a REBOL script or
more of a non-REBOL utility?
I really like your idea. I was toying with "how-to" get at this info a few
weeks ago, and it wasn't obvious. I am more than willing to be further
educated about this topic.
Rest of Carl's message:
http://www.escribe.com/internet/rebol/m25079.html
Thanks for the great suggestion, Carl. I think this project would further
enhance REBOL's appeal.
--Scott Jones