Preventing ved from using bold fonts under xwindows 
Author Message
 Preventing ved from using bold fonts under xwindows

Hi all!

I've just got my hands on poplog for Solaris v15.53. Ved now seems to
occasionally use bold fonts, which don't look very good given my current
configuration. E.g., in keywords on the command line, or in some recent
help files (I prefered the old -- index).

Is there an easy way to turn that off?

Cheers,




Mon, 31 Dec 2001 03:00:00 GMT  
 Preventing ved from using bold fonts under xwindows

Quote:

> Date: Thu, 15 Jul 1999 11:14:44 GMT
> Organization: MetroNet Communications Group Inc.

> Hi all!

> I've just got my hands on poplog for Solaris v15.53. Ved now seems to
> occasionally use bold fonts, which don't look very good given my current
> configuration. E.g., in keywords on the command line, or in some recent
> help files (I prefered the old -- index).

Me too. I find the bold (and worse still the coloured bits of text
in XVed), very irritating, especially as I normally work with
inverse video and sometimes the colours that turn up in Xved make
things hard to read (I am partly colour-blind, which probably
doesn't help). These special Ved characters also cause trouble for
people who prefer to use Emacs instead of Ved.

If you use XVed I think you can control the colours in your
.Xdefaults file, but finding out how may be tricky. Try REF XVED.

Quote:
> Is there an easy way to turn that off?

After you have read in a file you can use
    ENTER strip
to get rid of all the special graphic characters.

At first I read the documentation in REF VEDVARS as saying that if
you assign true to vedreadinplain it should have the same effect as
ENTER strip, on all files. However, instead it makes things much
worse: you see all the control characters. I misinterpreted the
documentation.

So what you want is to to have characters converted the first time a
file is put on the screen, after it is read in if it is one of the
documentation files.

As far as I can tell the only way to do this is to define the
procedure vedinitialise to put the procedure ved_strip into the
input stream, so that it is run when Ved next gets ready to read a
user command.

Try putting this in your vedinit.p file:

define vedinitialise(file);
        ;;; Do nothing if the file was already in a Ved buffer.
        returnif(file);

        ;;; otherwise check the first line to see if it is a documentation
        ;;; file (not a foolproof test).

        lvars firstline =  subscrv(1,vedbuffer);

        if isstartstring('HELP ', firstline)
        or isstartstring('TEACH ', firstline)
        or isstartstring('REF ', firstline)
        then
                vedinput(ved_strip);
        endif;
enddefine;

That will still leave all the annoying bold stuff on the status
line, etc. I don't know how to turn that off in general.

However, I have a version of vedfileselect which turns off special
characters in vedfileselect. You can fetch it from

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/lib/vedfileselect.p

and compile it from your vedinit.p

I hope that helps.

Aaron
--
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (NB: Anti Spam address)
PAPERS: ftp://ftp.cs.bham.ac.uk/pub/groups/cog_affect/0-INDEX.html



Thu, 03 Jan 2002 03:00:00 GMT  
 Preventing ved from using bold fonts under xwindows

Quote:

> Date: Thu, 15 Jul 1999 11:14:44 GMT
> Organization: MetroNet Communications Group Inc.

> Hi all!

> I've just got my hands on poplog for Solaris v15.53. Ved now seems to
> occasionally use bold fonts, which don't look very good given my current
> configuration. E.g., in keywords on the command line, or in some recent
> help files (I prefered the old -- index).

Me too. I find the bold (and worse still the coloured bits of text
in XVed), very irritating, especially as I normally work with
inverse video and sometimes the colours that turn up in Xved make
things hard to read (I am partly colour-blind, which probably
doesn't help). These special Ved characters also cause trouble for
people who prefer to use Emacs instead of Ved.

If you use XVed I think you can control the colours in your
.Xdefaults file, but finding out how may be tricky. Try REF XVED
or perhaps TEACH XVED.

Quote:
> Is there an easy way to turn that off?

After you have read in a file you can use
    ENTER strip
to get rid of all the special graphic characters.

The documentation in REF VEDVARS on first reading suggests that if you
assign true to vedreadinplain it should have the same effect as
    ENTER strip
on all files. However, instead it makes things much worse: you see all
the control characters. I misinterpreted the documentation.

So what you want is to have characters converted the first time a
file is put on the screen, after it is read in if it is one of the
documentation files.

As far as I can tell the only way to do this is to define the
procedure vedinitialise to put the procedure ved_strip into the
input stream, so that it is run when Ved next gets ready to read a
user command.

Try putting this in your vedinit.p file:

define vedinitialise(file);
    ;;; Do nothing if the file was already in a Ved buffer.
    returnif(file);

    ;;; otherwise check the first line to see if it is a documentation
    ;;; file (not a foolproof test).

    lvars firstline =  subscrv(1,vedbuffer);

    if isstartstring('HELP ', firstline)
    or isstartstring('TEACH ', firstline)
    or isstartstring('REF ', firstline)
    then
        vedinput(ved_strip);
    endif;
enddefine;

If you want to "strip" all the documentation permanently, then
see HELP NEWPOP.

That will still leave all the annoying bold stuff on the status
line, etc. I don't know how to turn that off in general.

However, I have a version of vedfileselect which turns off special
characters in vedfileselect. You can fetch it from

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/lib/vedfileselect.p

and compile it from your vedinit.p

I hope that helps.

Aaron
===
--
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (NB: Anti Spam address)
PAPERS: ftp://ftp.cs.bham.ac.uk/pub/groups/cog_affect/0-INDEX.html



Fri, 04 Jan 2002 03:00:00 GMT  
 Preventing ved from using bold fonts under xwindows

Quote:
>Hi all!

>I've just got my hands on poplog for Solaris v15.53. Ved now seems to
>occasionally use bold fonts, which don't look very good given my current
>configuration. E.g., in keywords on the command line, or in some recent
>help files (I prefered the old -- index).

>Is there an easy way to turn that off?

[snip]

Hi,

I don't have a Poplog to hand (soon... soon.... just got to get my RedHat
box home :-) so take the following with a pinch of untested salt.

Three ways to have a go:

1) You might be able to set the XVed fonts from the XVed command line using
the ved_xvedfont command. I *think* this made it to the full release (I
wrote it and it may have only got into the COGS local stuff). Use this to
set the bold font to the same as the non-bold font.

2) You can use ved_strip to cull bold fonts from HELP files, etc. --- but
this won't affect  the fonts used on the VED status bar, etc.

3) Set the resources directly with .Xdefaults/.xrdb or whatever. Something like
  XVed*font:          -adobe-courier-medium-r-*-*-*-120-*-*-m-*-iso8859-1
  XVed*altFont:     -adobe-courier-medium-r-*-*-*-120-*-*-m-*-iso8859-1
  XVed*boldFont:     -adobe-courier-medium-r-*-*-*-120-*-*-m-*-iso8859-1
  XVed*boldAltFont:   -adobe-courier-medium-r-*-*-*-120-*-*-m-*-iso8859-1
should make bold/italic fonts look identical.

You can also set these via Pop-11 using the xved_value procedure.

Without looking at the REF files I cannot be 100% that the *boldFont
resources apply to the status bar so YMMV.

Hope this helps,

Adrian

----
Adrian Howard. Head Techie. Victoria Real Ltd. http://www.victoriareal.co.uk



Fri, 04 Jan 2002 03:00:00 GMT  
 Preventing ved from using bold fonts under xwindows
 Thanks, Aaron. This works for me.

Luc

Quote:
> Try putting this in your vedinit.p file:

> define vedinitialise(file);
>         ;;; Do nothing if the file was already in a Ved buffer.
>         returnif(file);

>         ;;; otherwise check the first line to see if it is a documentation
>         ;;; file (not a foolproof test).

>         lvars firstline =  subscrv(1,vedbuffer);

>         if isstartstring('HELP ', firstline)
>         or isstartstring('TEACH ', firstline)
>         or isstartstring('REF ', firstline)
>         then
>                 vedinput(ved_strip);
>         endif;
> enddefine;



Sun, 06 Jan 2002 03:00:00 GMT  
 Preventing ved from using bold fonts under xwindows

Quote:
> Date: Wed, 21 Jul 1999 04:44:56 GMT
> Organization: Abatis-sys
>  Thanks, Aaron. This works for me.

> Luc
> > Try putting this in your vedinit.p file:

> > define vedinitialise(file);
> >         ;;; Do nothing if the file was already in a Ved buffer.
> >         returnif(file);

> >         ;;; otherwise check the first line to see if it is a documentation
> >         ;;; file (not a foolproof test).

> >         lvars firstline =  subscrv(1,vedbuffer);

> >         if isstartstring('HELP ', firstline)
> >         or isstartstring('TEACH ', firstline)
> >         or isstartstring('REF ', firstline)
> >         then
> >                 vedinput(ved_strip);
> >         endif;
> > enddefine;

John Williams sent me this more elegant version, which doesn't have
to look at the first line of the file.

    define vedinitialise(file);
        ;;; Do nothing if the file was already in a Ved buffer.
        returnif(file);

        if member(vedfileprops, [help teach ref]) then
            vedinput(ved_strip);
        endif;
    enddefine;

Sorry I forgot to pass it on earlier.

Aaron
--
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (NB: Anti Spam address)
PAPERS: ftp://ftp.cs.bham.ac.uk/pub/groups/cog_affect/0-INDEX.html



Sun, 06 Jan 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Accepting Italics and Bold fonts

2. bold font in messagebox ?

3. OLE, Word & NetExpress: changing fonts, bold etc

4. Print - lines, bold and change font size

5. bold symbol font

6. Setting active font to bold breaks highlighting

7. Printing Text Widget with fonts/underlines/bold etc.????

8. Running Ved from Ved

9. Using XWindows window handlers in Tk

10. re-using a ved window

11. Howto prevent border using EIP

12. Preventing using files from a previous project

 

 
Powered by phpBB® Forum Software