Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fci-mode and line-spacing #36

Closed
cpence opened this issue Aug 9, 2013 · 4 comments
Closed

fci-mode and line-spacing #36

cpence opened this issue Aug 9, 2013 · 4 comments

Comments

@cpence
Copy link

cpence commented Aug 9, 2013

This may be related to #15, but if line-spacing is non-zero, gaps appear in the FCI between each line of text. (I really like (setq-default line-spacing 2), as it opens up the vertical display of text on the screen.)

Is there either a fix, or another way to specify looser leading that wouldn't clash with FCI?

@alpaker
Copy link
Owner

alpaker commented Aug 9, 2013

This is unrelated to #15, and unfixable given the current capabilities of Emacs's display engine. As currently implemented fci-mode doesn't draw a single line; the fill-column rule is actually a series of independently-drawn line segments, one per line. This interacts in an unfortunate way with the display engine's line-spacing feature, which has a very straight-forward implementation and, essentially, works like this: Each line in a window is rendered in a fashion that's agnostic wrt to the value of line-spacing. Then, if line-spacing is non-zero, that many pixels are inserted between lines and filled with the appropriate background color for that region. That's why, with non-zero line-spacing, the fill-column rule appears fragmented: a given rule segment is part of the content of a window line, and the leading introduced by non-zero line-spacing is, by definition, inserted between lines.

AFAICT there's no way to insert anything in the gap between lines that's opened up by a non-zero value of line-spacing. The display engine is organized at a deep level around line-based display (because Emacs is supposed to be fundamentally agnostic between character and graphical terminals, and the former are necessarily structured in terms of text lines); anything you ask it to render will be rendered as part of a line, and so can't encroach into the space opened up by leading.

The natural step at this point is to consider an implementation that doesn't participate in line-based rendering, such as laying a single background image over the entire window. Unfortunately, the only way to do at the moment is to specify a stipple image for the default face, which only works on the X (theoretically it's also supported on OS X, but I've never been able to get it to work on that platform).

Sorry I can't be more helpful. I've been aware of this problem for a while (I should add it the Known Issues section) and have looked into possible fixes, but to no avail. I'd love a solution (I use a line-spacing of 1 in my normal setup) and if anyone has suggestions I'd welcome them.

@cpence
Copy link
Author

cpence commented Aug 9, 2013

Awesome and detailed reply, thanks! This is why I've never had the guts to jump into Emacs development. =)

@alpaker
Copy link
Owner

alpaker commented Jan 29, 2019

Just FYI, I'm abandoning this package and welcoming requests to be take over as maintainer.

@alpaker
Copy link
Owner

alpaker commented Aug 6, 2020

The functionality provided by this package has now been implemented natively in Emacs as display-fill-column-indicator-mode, available as of version 27.0.90. Unless you are forced to use an older Emacs, you should use the native implementation instead of fci-mode. The former is unaffected by most of the compatibility issues that this add-on has.

@alpaker alpaker closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants