all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: shigeru.fukaya@gmail.com, 17813@debbugs.gnu.org, miles@gnu.org
Subject: bug#17813: 24.3.91; bad linum display with `text-scale-adjust'
Date: Fri, 20 Jun 2014 17:27:57 +0300	[thread overview]
Message-ID: <83tx7fr6z6.fsf@gnu.org> (raw)
In-Reply-To: <jwvd2e3somw.fsf-monnier+emacsbugs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: shigeru.fukaya@gmail.com,  17813@debbugs.gnu.org,  miles@gnu.org
> Date: Fri, 20 Jun 2014 09:35:32 -0400
> 
> >> I think the right solution is to scale the margin width by the ratio
> >> "linum font size / base font size".  Then users can set their `linum'
> >> face the way want and choose between (1) and (2).
> >> But it turns out that face-attribute can't be used for that because it
> >> does not pay attention to face-remapping-alist.
> > Not sure what you mean by that: attributes don't care about remapping,
> > because remapping doesn't change the attributes, it only changes their
> > values.
> 
> I mean the following:
> 
>  a way to know "if I apply face `foo' (and only face `foo') to a chunk
>  of text in the current buffer, what will it look like: will it be bold?
>  what will be its size? ..."
> 
> `face-attribute' doesn't work here because it fails to take into account
> the effect of face-remapping-alist.

APIs that need to take face remapping into account need to be
specifically programmed to do that.  Some were, some weren't;
face-font belongs to the former.

> >   (aref (font-info (face-font 'default)) 2)
> 
> Indeed, that seems to work, thanks.
> 
> > But note that font's size and its "width" (which is actually the
> > average width recorded in the font file) are not identical.  We don't
> > have a Lisp API to get the average width of a non-default font;
> 
> Indeed, that's an additional problem.
> 
> > perhaps we should.
> 
> I'm all for it.

Would it be OK to add that as the last element to the array returned
by font-info?





  reply	other threads:[~2014-06-20 14:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 17:25 bug#17813: 24.3.91; bad linum display with `text-scale-adjust' Shigeru Fukaya
2014-06-19 18:46 ` Stefan Monnier
2014-06-20  9:30   ` Eli Zaretskii
2014-06-20 13:35     ` Stefan Monnier
2014-06-20 14:27       ` Eli Zaretskii [this message]
2014-06-20 15:35         ` Stefan Monnier
2014-07-08 19:33 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tx7fr6z6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17813@debbugs.gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=shigeru.fukaya@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.