[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17813: 24.3.91; bad linum display with `text-scale-adjust'
From: |
Eli Zaretskii |
Subject: |
bug#17813: 24.3.91; bad linum display with `text-scale-adjust' |
Date: |
Fri, 20 Jun 2014 12:30:42 +0300 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 19 Jun 2014 14:46:48 -0400
> Cc: 17813@debbugs.gnu.org, miles@gnu.org
>
> 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.
> Miles, Eli, others, do you know of a function that returns "the font
> size, including face-remapping-alist effects"?
I think you want
(aref (font-info (face-font 'default)) 2)
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;
perhaps we should.