GNU bug report logs -
#48148
27.2; ox-ascii breaks TITLE line wrongly when 2 width char is used
Previous Next
Reported by: Shingo Tanaka <shingo.fg8 <at> gmail.com>
Date: Sat, 1 May 2021 23:53:02 UTC
Severity: normal
Found in version 27.2
Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 48148 <at> debbugs.gnu.org (full text, mbox):
> From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
> Cc: Shingo Tanaka <shingo.fg8 <at> gmail.com>, 48148 <at> debbugs.gnu.org
> Date: Sun, 02 May 2021 10:23:34 +0200
>
> > The accurate method of lining up in these cases is to use
> > window-text-pixel-size instead. That function will return the exact
> > width of a string as it will displayed, in pixels, because it uses the
> > same code as the display engine.
>
> Would you mind giving an example about `window-text-pixel-size' usage in
> this situation?
I'm not sure what kind of example is necessary. How about if you ask
specific questions about the arguments of that function which you
don't understand clearly how to use?
> AFAIU, `window-text-pixel-size' returns the size of the window
No, it returns the size of _text_ when displayed in a window.
> Note that `text-width' in the code above is not related to the width
> of the window, but is a maximum number of allowed characters on a
> line.
I didn't mean text-width, I meant the use of string-width: it should
be replaced by a call to window-text-pixel-size.
This bug report was last modified 4 years and 16 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.