GNU bug report logs -
#72771
31.0.50; shr html renderer throwing "Specified window is not displaying the current buffer"
Previous Next
Reported by: Rob Stewart <R.Stewart <at> hw.ac.uk>
Date: Fri, 23 Aug 2024 08:22:02 UTC
Severity: normal
Found in version 31.0.50
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 72771 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 24 Aug 2024 10:10:06 -0700
> Cc: R.Stewart <at> hw.ac.uk, 72771 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
> From: Jim Porter <jporterbugs <at> gmail.com>
>
> > . use the font obtained from (face-font 'default) (or the actual face
> > of the text, if you can get at it easily), like this:
> >
> > (aref (font-info (face-font 'default)) 10)
>
> I think the problem is getting the actual face, which works for simple
> cases via 'get-text-property', but not for more complex ones, e.g. when
> the 'face' property is a list; 'face-font' raises an error in that case.
> Effectively what I want would be a Lisp version of
> 'face_at_buffer_position', but that requires a window object anyway, so
> I'm back to the original problem...
What's wrong with face-at-point?
> > . use buffer-text-pixel-size or string-pixel-width to measure the
> > width of a string of a single SPC character
>
> I think this wouldn't work since I want the average font width, not the
> width of SPC.
Then use a few different characters and take their average width.
And I think you place too much faith in the average-width parameter of
a font. It can fail you. The display engine uses:
char_width = (font->average_width
? font->average_width
: font->space_width);
> In light of the above, I think what I have now might be the best way to
> do it for the time being
Do you still think that?
This bug report was last modified 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.