GNU bug report logs -
#17813
24.3.91; bad linum display with `text-scale-adjust'
Previous Next
Reported by: Shigeru Fukaya <shigeru.fukaya <at> gmail.com>
Date: Thu, 19 Jun 2014 17:27:02 UTC
Severity: normal
Found in version 24.3.91
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: shigeru.fukaya <at> gmail.com, 17813 <at> debbugs.gnu.org, miles <at> 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?
This bug report was last modified 10 years and 361 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.