all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* make ps-print-buffer-with-faces all bold
@ 2016-07-23 21:09 myglc2
  0 siblings, 0 replies; 5+ messages in thread
From: myglc2 @ 2016-07-23 21:09 UTC (permalink / raw)
  To: help-gnu-emacs

I alway want emacs printout in color but find the 'normal' faces
frustratingly unreadable, especially in low contrast colors. So...  Here
is how to make everything bold in ps-print-buffer-with-faces, etc.

;; ps-print in all bold fonts
(ps-extend-face-list
 (mapcar (function  (lambda (x) (list x
				      (face-attribute x :foreground)     
				      (face-attribute x :background)
				      'bold)))
	 (face-list)) 'MERGE)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make ps-print-buffer-with-faces all bold
       [not found] <mailman.1954.1469320813.26859.help-gnu-emacs@gnu.org>
@ 2016-07-24 13:06 ` Emanuel Berg
  2016-07-24 15:49   ` myglc2
       [not found]   ` <mailman.1968.1469375478.26859.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Emanuel Berg @ 2016-07-24 13:06 UTC (permalink / raw)
  To: help-gnu-emacs

myglc2 wrote:

> I alway want emacs printout in color but find
> the 'normal' faces frustratingly unreadable,
> especially in low contrast colors. So... Here
> is how to make everything bold in
> ps-print-buffer-with-faces, etc.
>
> ;; ps-print in all bold fonts
> (ps-extend-face-list
>  (mapcar (function  (lambda (x) (list x
> 				      (face-attribute x :foreground)     
> 				      (face-attribute x :background)
> 				      'bold)))
> 	 (face-list)) 'MERGE)

Cool, but perhaps you should change the "low
contrast colors" instead? Or do they look good
on the screen, only not so when printed?

In what context should one use the code? I.e.,
do you run it once or every time you print?

And: I don't think you need `function' before
`lambda'.

Last, aren't there other attributes than
foreground and background? Perhaps you can find
a function that returns the whole thing, and
then just set it to bold?

Otherwise keep it up...

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 58 Blogomatic articles -                   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make ps-print-buffer-with-faces all bold
  2016-07-24 13:06 ` make ps-print-buffer-with-faces all bold Emanuel Berg
@ 2016-07-24 15:49   ` myglc2
       [not found]   ` <mailman.1968.1469375478.26859.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: myglc2 @ 2016-07-24 15:49 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> myglc2 wrote:
>
>> I alway want emacs printout in color but find
>> the 'normal' faces frustratingly unreadable,
>> especially in low contrast colors. So... Here
>> is how to make everything bold in
>> ps-print-buffer-with-faces, etc.
>>
>> ;; ps-print in all bold fonts
>> (ps-extend-face-list
>>  (mapcar (function  (lambda (x) (list x
>> 				      (face-attribute x :foreground)     
>> 				      (face-attribute x :background)
>> 				      'bold)))
>> 	 (face-list)) 'MERGE)
>
> Cool, but perhaps you should change the "low
> contrast colors" instead?

To print I use a light theme and I want color to match the screen.  Dark
themes are generally unreadable printed this way. Something clever needs
to be done with the color if you want to print dark themes.

> Or do they look good on the screen, only not so when printed?

On my printer normal fonts are ~ unreadable.

> In what context should one use the code? I.e.,
> do you run it once or every time you print?

emacs init file.

> And: I don't think you need `function' before
> `lambda'.

elisp noobie ;-)

> Last, aren't there other attributes than
> foreground and background? Perhaps you can find
> a function that returns the whole thing, and
> then just set it to bold?

The ps-print.el public interface requires this custom structure.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make ps-print-buffer-with-faces all bold
       [not found]   ` <mailman.1968.1469375478.26859.help-gnu-emacs@gnu.org>
@ 2016-07-24 20:42     ` Emanuel Berg
  2016-07-25 15:08       ` myglc2
  0 siblings, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2016-07-24 20:42 UTC (permalink / raw)
  To: help-gnu-emacs

myglc2 wrote:

>> Last, aren't there other attributes than
>> foreground and background? Perhaps you can
>> find a function that returns the whole
>> thing, and then just set it to bold?
>
> The ps-print.el public interface requires
> this custom structure.

OK, because if you use `describe-function' you
get a whole lot of stuff!

But perhaps PostScript in this case (?) only
uses what you mention?

Actually it all I use for faces. Foreground,
background, and bold or not (the foreground).

    (modify-face 'erc-header-line "white"  "magenta"  nil t)

The fourth argument is the foreground boldness;
the third is "stipple".

A lot of the properties are not supported in
the Linux VTs. Maybe they look cool in X?

Ironic thing is, rms wanted to make Emacs
a word processor for the masses. Instead it
stayed, and became even more so, a text editor
and programming tool for the computer elite.

           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: normal
            Slant: normal
       Foreground: blue
DistantForeground: unspecified
       Background: unspecified
        Underline: nil
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: nil
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
          Inherit: unspecified

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 58 Blogomatic articles -                   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make ps-print-buffer-with-faces all bold
  2016-07-24 20:42     ` Emanuel Berg
@ 2016-07-25 15:08       ` myglc2
  0 siblings, 0 replies; 5+ messages in thread
From: myglc2 @ 2016-07-25 15:08 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> myglc2 wrote:
>
>>> Last, aren't there other attributes than
>>> foreground and background? Perhaps you can
>>> find a function that returns the whole
>>> thing, and then just set it to bold?
>>
>> The ps-print.el public interface requires
>> this custom structure.
>
> OK, because if you use `describe-function' you
> get a whole lot of stuff!
>
> But perhaps PostScript in this case (?) only
> uses what you mention?

Restating the function under discussion for handy reference ...

;; ps-print in all bold fonts
(ps-extend-face-list
 (mapcar (function  (lambda (x) (list x
				      (face-attribute x :foreground)     
				      (face-attribute x :background)
				      'bold)))
	 (face-list)) 'MERGE)

OK I think I missed your earlier point. Yes, you can specify additional
attributes, to the extent that ps-print supports them, using the
'ps-extend-face-list' interface.

The reason I specify the colors is that with nil or t for foreground and
background, ps-print prints in B&W. So this function re-states the
colors that ps-print already knows about in order to bold the faces w/o
clobbering the color.  HTH - George




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-25 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1954.1469320813.26859.help-gnu-emacs@gnu.org>
2016-07-24 13:06 ` make ps-print-buffer-with-faces all bold Emanuel Berg
2016-07-24 15:49   ` myglc2
     [not found]   ` <mailman.1968.1469375478.26859.help-gnu-emacs@gnu.org>
2016-07-24 20:42     ` Emanuel Berg
2016-07-25 15:08       ` myglc2
2016-07-23 21:09 myglc2

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.