title: Emacs Line Height
body: <p>I am trying to set the line height of text in an Emacs buffer so there is space above and below the letters.  From <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Line-Height.html" rel="noreferrer">the documentation</a>, I infer that the <code>line-height</code> text property may help me to accomplish this.</p>
  
  <p>There is also a <code>line-spacing</code> variable which I can set like <code>(setq-default line-spacing 0.25)</code>.  This kind of works, except it does not produce space before text, only after it.  I don’t like the way this looks when using modes like <code>show-paren-mode</code>, since it “dips” down:</p>
  
  <h2>Undesired current behavior (“hanging”)</h2>
  
  <p><img src="https://i.stack.imgur.com/c4g1U.png" alt="Undesired current behavior"></p>
  
  <h2>Desired behavior mockup (vertically-centered)</h2>
  
  <p><img src="https://i.stack.imgur.com/9zocK.png" alt="Desired behavior"></p>
  
  <p>I'd like to vertically-center the text.</p>
  
  <p>I have discovered that I can temporarily get the effect I want with the following code:</p>
  
  <pre><code>(add-text-properties (point-min) (point-max)
                       '(line-spacing 0.25 line-height 1.25))
  </code></pre>
  
  <p>However, in some modes the properties go away in regions where I start typing. How do I make that top and bottom spacing the <em>default</em>? (Hooks won't work.)</p>