DUIM font question 
Author Message
 DUIM font question

How would you --or is it even possible--select a Windows-specific font
in DUIM for a text field or editor?  The choices offered by the
<text-style> class, since it is device independent, don't include the
Windows fonts.   And I don't fathom any way to use the <device-font>
subclass.  Thanks for any help.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 15 Dec 2002 03:00:00 GMT  
 DUIM font question

Quote:

>How would you --or is it even possible--select a Windows-specific font
>in DUIM for a text field or editor?  The choices offered by the
><text-style> class, since it is device independent, don't include the
>Windows fonts.   And I don't fathom any way to use the <device-font>
>subclass.  Thanks for any help.

I tried this in the Playground and it worked fine for me:

contain(make(<text-field>,
                         text-style: make-text-style(#"fix", #f, #"bold",
#"roman", #"normal"),
                         value: "hello"));



Mon, 16 Dec 2002 03:00:00 GMT  
 DUIM font question
Yes it does.   And I found some other information from that great place to
experiment--the DUIM GUI test suite.  I copied (err... I mean modelled) some
code from there and made a simple frame in the playground that put up the
choose-font dialog.   I stored the results from that dialog into a frame
slot--a vector--and paused the application to look at the contents each time
I chose a new font.  Lo and behold, I saw that the "font" returned from the
choose-font dialog is actually a <text-style> and that the text style has a
text-style-name slot which isn't mentioned in the documentation anywhere.
Of course, that slot holds the font name.  So, now that I see that you can
do all this,  I'll want to stick with the portable text styles provided by
DUIM by default.   It seems obvious that one computer may have Arial, 12,
semi-bold, but another one won't.  And, although I will stick with the
portable DUIM styles,  I think I'll choose a larger size.  My eyes are even
worse than they used to be.

I assume that the portable DUIM text styles would even translate nicely to
the next platform that FD is released on.  That would be ....?  Just
kidding, but my vote would be Linux.


Quote:


> >How would you --or is it even possible--select a Windows-specific font
> >in DUIM for a text field or editor?  The choices offered by the
> ><text-style> class, since it is device independent, don't include the
> >Windows fonts.   And I don't fathom any way to use the <device-font>
> >subclass.  Thanks for any help.

> I tried this in the Playground and it worked fine for me:

> contain(make(<text-field>,
>                          text-style: make-text-style(#"fix", #f, #"bold",
> #"roman", #"normal"),
>                          value: "hello"));



Mon, 16 Dec 2002 03:00:00 GMT  
 DUIM font question

Quote:

> Yes it does.   And I found some other information from that great place to
> experiment--the DUIM GUI test suite.  ...  the text style has a
> text-style-name slot which isn't mentioned in the documentation anywhere.

Mea culpa ;-(  I added that slot in a hurry before I left Harlequin, so we
could change the $%&* font in the HD/FD editor, and I failed to update the
documentation.

Quote:
> ...
> I assume that the portable DUIM text styles would even translate nicely to
> the next platform that FD is released on. ...

That's certainly the idea, AFAIK.  I see no reason why the font-name slot
couldn't have some use on other platforms, too, though I'm not at all
confident a name like "Arial" would work across platforms, given what X
font names look like.  Like I say, I added that in a hurry -- I'd've liked
to have come up with a model for named slots which I believed was more
likely to be portable :-)

Quote:
> ...  That would be ....?  Just kidding, but my vote would be Linux.

Could be, who knows?  Actually, there's already been a press release on
the Fun-O website which mentions alpha-testing of bits of Fun-D on "Unix"
<http://www.fun-o.com/news/fundev2-release.phtml>.  Then again, since the
DUIM front-end is open-source, you might see DUIM working with Gwydion's
d2c some day, who knows? :-)

Quote:
> ...

> > >How would you --or is it even possible--select a Windows-specific font
> > >in DUIM for a text field or editor? ...

Hugh


Mon, 16 Dec 2002 03:00:00 GMT  
 DUIM font question

Quote:


> > ...
> > I assume that the portable DUIM text styles would even translate nicely to
> > the next platform that FD is released on. ...

> That's certainly the idea, AFAIK.  I see no reason why the font-name slot
> couldn't have some use on other platforms, too, though I'm not at all
> confident a name like "Arial" would work across platforms, given what X
> font names look like.  Like I say, I added that in a hurry -- I'd've liked
> to have come up with a model for named slots which I believed was more
> likely to be portable :-)

Arial gets everywhere. IE4 instaled it on my Mac no matter how much I begged it
not to. However, even Times has slightly different names on some platforms, so
names aren't cross platform, although on the same platform they're very useful
and there tend to be equivalents for any named font on any given platform.

Quote:
> > ...  That would be ....?  Just kidding, but my vote would be Linux.

> Could be, who knows?  Actually, there's already been a press release on
> the Fun-O website which mentions alpha-testing of bits of Fun-D on "Unix"
> <http://www.fun-o.com/news/fundev2-release.phtml>.  Then again, since the
> DUIM front-end is open-source, you might see DUIM working with Gwydion's
> d2c some day, who knows? :-)

We (Gwydion) are working on it. I've taken some time off from DUIM to work on
the MacOS X port of d2c, which has been almost done for a week or two now. :-)
Before that I checked in a version of the public sources of DUIM converted to
compile (not run!) with d2c. Now all we need are the platform-specific backend
implementations and we're away. :-)

- Rob.

--

"Don't talk to sociologists. Social practice has no sociological content."A&L
http://www.robmyers.org/                  http://www.gwydiondylan.org/



Mon, 16 Dec 2002 03:00:00 GMT  
 DUIM font question


Quote:
>I assume that the portable DUIM text styles would even translate nicely to
>the next platform that FD is released on.  That would be ....?  Just
>kidding, but my vote would be Linux.

DUIM text styles are designed to be a portable abstraction that
"just works" from one platform to another.  But like most abstractions,
it comes at a price -- when you use abstract text styles, you give up
a little of the precise control that you would get if you carefully chose
every font by name on every platform.  But that's what DUIM "device
fonts" are for...


Mon, 16 Dec 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. How to change font in DUIM

2. A duim menu question

3. DUIM focus question

4. DUIM question

5. Stupid question about DUIM/widgets

6. DUIM question

7. ROM font question... 8x8 font

8. help with DUIM application

9. updating an icon label in DUIM

10. updating an icon label in DUIM

11. problem with DUIM at higher resolutions

12. DUIM: define frame q?

 

 
Powered by phpBB® Forum Software