unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Using proportional fonts in Gnus
       [not found] ` <m3r73xfmhn.fsf@quimbies.gnus.org>
@ 2006-04-16 21:59   ` Miles Bader
  2006-04-17  4:37     ` Stefan Monnier
                       ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Miles Bader @ 2006-04-16 21:59 UTC (permalink / raw)
  Cc: emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Nope.  Emacs' support for proportional fonts is still pretty
> immature. 

It's interesting to consider how one might do this in an "Emacsy"
manner convenient for elisp programmers.

For instance a "super tab" text property saying "align to colum N (or
leave M units of whitespace if already there)"; maybe some degree of
indirection would be useful so one need not rewrite the buffer text to
change N dynamically.

Given that emacs already has text properties to allow munging spaces,
perhaps this would even not be terribly difficult to implement (you'd
just leave the decision as to how wide the resulting space was until a
point where the display engine had an idea of concrete display
positions).

-Miles
-- 
"Suppose He doesn't give a shit?  Suppose there is a God but He
just doesn't give a shit?"  [George Carlin]

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

* Re: Using proportional fonts in Gnus
  2006-04-16 21:59   ` Using proportional fonts in Gnus Miles Bader
@ 2006-04-17  4:37     ` Stefan Monnier
  2006-04-17  6:43     ` Eli Zaretskii
  2006-04-17 17:56     ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2006-04-17  4:37 UTC (permalink / raw)
  Cc: emacs-devel

>> Nope.  Emacs' support for proportional fonts is still pretty
>> immature. 

> It's interesting to consider how one might do this in an "Emacsy"
> manner convenient for elisp programmers.

> For instance a "super tab" text property saying "align to colum N (or
> leave M units of whitespace if already there)"; maybe some degree of
> indirection would be useful so one need not rewrite the buffer text to
> change N dynamically.

I'm not quite sure what the OP's "column based display" really entails, but
a related problem I've bumped into several times already is that
the :align-to display property helps handle left-aligned columns of
proportional-text, but there's no easy way to cut the text at the right
point if it overflows, and there's no easy way to handle right-alignment.

In http://www.iro.umontreal.ca/~monnier/elisp/mpc.png you can see in the
songs buffer (bottom right) that the last three song titles were truncated
too soon bu t that the album title OTOH was truncated too late (thus
pushing the Artist name a bit further than expected).  The "Time" is
right-laigned and in this case it worked out all right because digits are
pretty evenly spaced and the "Time" string is overall fairly comparable
(the length of "m" compensates the length of "i") so the "e" of "Time" goes
only a tiny bit further than the actual time entries.


        Stefan

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

* Re: Using proportional fonts in Gnus
  2006-04-16 21:59   ` Using proportional fonts in Gnus Miles Bader
  2006-04-17  4:37     ` Stefan Monnier
@ 2006-04-17  6:43     ` Eli Zaretskii
  2006-04-17  7:03       ` Miles Bader
  2006-04-17 17:56     ` Richard Stallman
  2 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2006-04-17  6:43 UTC (permalink / raw)
  Cc: emacs-devel

> CC: emacs-devel@gnu.org
> From: Miles Bader <miles@gnu.org>
> Date: Mon, 17 Apr 2006 06:59:08 +0900
> Posted-To: gnu.emacs.gnus
> 
> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> > Nope.  Emacs' support for proportional fonts is still pretty
> > immature. 
> 
> It's interesting to consider how one might do this in an "Emacsy"
> manner convenient for elisp programmers.
> 
> For instance a "super tab" text property saying "align to colum N (or
> leave M units of whitespace if already there)"; maybe some degree of
> indirection would be useful so one need not rewrite the buffer text to
> change N dynamically.

I don't see the original message anywhere in this list, so perhaps I
misunderstand the issue.  But if I do understand it, then there're no
columns when proportional fonts are used.

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

* Re: Using proportional fonts in Gnus
  2006-04-17  6:43     ` Eli Zaretskii
@ 2006-04-17  7:03       ` Miles Bader
  0 siblings, 0 replies; 5+ messages in thread
From: Miles Bader @ 2006-04-17  7:03 UTC (permalink / raw)
  Cc: emacs-devel

On 4/17/06, Eli Zaretskii <eliz@gnu.org> wrote:
> > For instance a "super tab" text property saying "align to colum N (or
> > leave M units of whitespace if already there)"; maybe some degree of
> > indirection would be useful so one need not rewrite the buffer text to
> > change N dynamically.
>
> I don't see the original message anywhere in this list, so perhaps I
> misunderstand the issue.  But if I do understand it, then there're no
> columns when proportional fonts are used.

Well, the actual units to use is of course one detail to figure out.

However I do think there are "columns" in the sense that for instance
if you specify a proportional default font, emacs will figure out
window size which is 80 "columns", and will choose some size to use
for tabs (which are defined in terms of columns).  It's not an absurd
concept: you just pick some character to use in definining what a
column is, for instance SPC.

-Miles
--
Do not taunt Happy Fun Ball.

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

* Re: Using proportional fonts in Gnus
  2006-04-16 21:59   ` Using proportional fonts in Gnus Miles Bader
  2006-04-17  4:37     ` Stefan Monnier
  2006-04-17  6:43     ` Eli Zaretskii
@ 2006-04-17 17:56     ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2006-04-17 17:56 UTC (permalink / raw)
  Cc: emacs-devel

    For instance a "super tab" text property saying "align to colum N (or
    leave M units of whitespace if already there)"; maybe some degree of
    indirection would be useful so one need not rewrite the buffer text to
    change N dynamically.

There could be a kind of alignment property which says "align the same
as position P, plus OFFSET."  (P would be a marker.)  Once we have the
long-requested functions to compute columns in pixels, this would be
easy to implement.

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

end of thread, other threads:[~2006-04-17 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <u8xue81xb.fsf@yahoo.co.uk>
     [not found] ` <m3r73xfmhn.fsf@quimbies.gnus.org>
2006-04-16 21:59   ` Using proportional fonts in Gnus Miles Bader
2006-04-17  4:37     ` Stefan Monnier
2006-04-17  6:43     ` Eli Zaretskii
2006-04-17  7:03       ` Miles Bader
2006-04-17 17:56     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).