* Re: [9fans] Font find
@ 2001-02-09 12:09 rog
0 siblings, 0 replies; 4+ messages in thread
From: rog @ 2001-02-09 12:09 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 62 bytes --]
pressing space should move on to
the next page.
rog.
[-- Attachment #2: Type: message/rfc822, Size: 1040 bytes --]
To: cse.psu.edu!9fans
Cc: vitanuova.com!rog
Subject: Re: [9fans] Font find
Date: Thu, 8 Feb 2001 22:12:40 -0500
Message-ID: <981666994.2120952.0@localhostnl.demon.nl>
Thank you. I installed it and it worked quite well
in displaying the fonts. The only problem I saw
is that it would not scroll when the output
went beyond the length of the window. To
compensate for this I specified the file directory
instead of using the * .
-Bill
>
> i just hacked up a little program which you might find useful.
>
> try, for instance:
>
> fontshow 'Hello, world' /lib/font/bit/*/*.font
>
> cheers,
> rog.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] Font find
@ 2001-02-09 3:12 William Staniewicz
0 siblings, 0 replies; 4+ messages in thread
From: William Staniewicz @ 2001-02-09 3:12 UTC (permalink / raw)
To: 9fans; +Cc: rog
Thank you. I installed it and it worked quite well
in displaying the fonts. The only problem I saw
is that it would not scroll when the output
went beyond the length of the window. To
compensate for this I specified the file directory
instead of using the * .
-Bill
>
> i just hacked up a little program which you might find useful.
>
> try, for instance:
>
> fontshow 'Hello, world' /lib/font/bit/*/*.font
>
> cheers,
> rog.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [9fans] Font find
@ 2001-02-08 19:44 William Staniewicz
0 siblings, 0 replies; 4+ messages in thread
From: William Staniewicz @ 2001-02-08 19:44 UTC (permalink / raw)
To: 9fans
Is there a quick and easy way to see which
fonts support a particular character?
(Other than trying each out with /lib/keyboard?)
I am looking for fonts that display:
0192 $f ƒ latin small letter script f
Which is used to represent the Dutch "florin"
currency symbol.
-Bill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] Font find
@ 2001-02-08 16:45 rog
0 siblings, 0 replies; 4+ messages in thread
From: rog @ 2001-02-08 16:45 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 162 bytes --]
i just hacked up a little program which you might find useful.
try, for instance:
fontshow 'Hello, world' /lib/font/bit/*/*.font
cheers,
rog.
[-- Attachment #2: Type: message/rfc822, Size: 1527 bytes --]
To: cse.psu.edu!9fans
Subject: [9fans] Font find
Date: Thu, 8 Feb 2001 14:44:41 -0500
Message-ID: <20010208134832.320CA199ED@mail.cse.psu.edu>
Is there a quick and easy way to see which
fonts support a particular character?
(Other than trying each out with /lib/keyboard?)
I am looking for fonts that display:
0192 $f latin small letter script f
Which is used to represent the Dutch "florin"
currency symbol.
-Bill
[-- Attachment #3: fontshow.c --]
[-- Type: text/plain, Size: 1822 bytes --]
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <event.h>
Font *defont;
Point cp;
int height;
char *str;
char **fonts;
int index;
void main(int argc, char *argv[])
{
Event e;
if (argc < 3) {
fprint(2, "usage: fontshow string font...\n");
exits("usage");
}
if (initdraw(nil, nil, "fontshow") < 0) {
fprint(2, "initdraw failed: %r\n");
exits("initdraw");
}
einit(Emouse|Ekeyboard);
defont = display->defaultfont;
str = argv[1];
fonts = argv + 2;
index = 0;
eresized(0);
for (;;) {
switch(event(&e)){
case Ekeyboard:
switch(e.kbdc){
case 'q':
case '\04':
exits(nil);
case ' ':
if (fonts[index] == nil)
exits(nil);
eresized(0);
}
break;
case Emouse:
if(e.mouse.buttons){
}
break;
}
}
exits(nil);
}
void
fontprint(Font *f, char *s)
{
Point p;
p = string(screen, cp, display->black, (Point){0, 0}, f, s);
cp = p;
if (f->height > height)
height = f->height;
}
void
nl(void)
{
cp.x = screen->r.min.x;
cp.y += height;
height = 0;
}
void redraw(Image *screen)
{
char *s;
int i;
Font *f;
char buf[128];
cp = screen->r.min;
height = 0;
draw(screen, screen->r, display->white, display->opaque, (Point){0, 0});
for (; fonts[index]; index++) {
f = openfont(display, fonts[index]);
if (f->height + cp.y > screen->r.max.y)
break;
fontprint(defont, fonts[index]);
fontprint(defont, ": ");
if (f == 0) {
sprint(buf, "cannot open: %r");
fontprint(defont, buf);
nl();
} else {
fontprint(f, str);
nl();
}
}
}
void
eresized(int new)
{
if(new && getwindow(display, Refnone) < 0){
fprint(2, "can't reattach to window: %r\n");
exits("attach");
}
if (new)
index = 0;
redraw(screen);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-02-09 12:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-09 12:09 [9fans] Font find rog
-- strict thread matches above, loose matches on Subject: below --
2001-02-09 3:12 William Staniewicz
2001-02-08 19:44 William Staniewicz
2001-02-08 16:45 rog
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).