[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#858304: vim-runtime: markdown syntax highlighting (and possibly others) goes crazy and drives the terminal crazy



At 2017-04-07T12:08:58-0400, James McCoy wrote:
> On Fri, Apr 07, 2017 at 07:23:39AM -0400, G. Branden Robinson wrote:
> > However, my xterms are somewhat customized.  I'm attaching my
> > .Xresources file.
> 
> Perfect! That seems to be the difference.  I, and presumably Francesco, aren't
> using TTF fonts.  If I change your Xresources to use
> 
> XTerm.*.VT100.Font: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
> 
> instead of the FaceName/FaceSize resources, then playing the recording
> reproduces the problem.

I agree that we're narrowing it down.  I commented out my *.face*
resources, xrdb -merged .Xresources, ran xterms from other xterms, and
got some intriguing stuff on stderr.

$ xterm
xterm: cannot load font '-Misc-Fixed-Bold-o-*-*-13-120-75-75-C-60-ISO10646-1'
$ xterm -fn '-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1'
xterm: cannot load font '-Misc-Fixed-Medium-o-*-*-18-120-100-100-C-90-ISO10646-1'
xterm: cannot load font '-Misc-Fixed-Bold-o-*-*-18-120-100-100-C-90-ISO10646-1'
xterm: cannot load font '-Misc-Fixed-Medium-o-*-*-18-120-100-100-C-180-ISO10646-1'
xterm: cannot load font '-Misc-Fixed-Medium-o-*-*-18-120-100-100-C-180-ISO10646-1'

To me, this implicates something at or near the bold font emulation
stuff that xterm does.  This may be enough for Thomas Dickey to locate
the bug.

There's some pretty complicated logic involved; from xterm(1):

alwaysBoldMode (class AlwaysBoldMode)
       Specifies whether xterm should check if the normal and bold
       fonts are distinct before deciding whether to use overstriking
       to simulate bold fonts.  If this resource is true, xterm does
       not make the check for distinct fonts when deciding how to
       handle the boldMode resource.  The default is "false".

       boldMode   alwaysBoldMode   Comparison   Action
       ----------------------------------------------------
       false      false            ignored      use font
       false      true             ignored      use font
       true       false            same         overstrike
       true       false            different    use font
       true       true             ignored      overstrike

       This resource is used only for bitmap fonts:

       ·   When using bitmap fonts, it is possible that the font
           server will approximate the bold font by rescaling it from
           a different font size than expected.  The alwaysBoldMode
           resource allows the user to override the (sometimes poor)
           resulting bold font with overstriking (which is at least
           consistent).

       ·   The problem does not occur with TrueType fonts (though
           there can be other unnecessary issues such as different
           coverage of the normal and bold fonts).

       As an alternative, setting the allowBoldFonts resource to false
       overrides both the alwaysBoldMode and the boldMode resources.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


Reply to: