2

I'm tired of the weird (seemingly) unpredictable font behavior not just in org-mode but also anywhere I use some unicode symbols. My setup is spacemacs and I'm looking for function that I can run on startup that will make all the text rendering use the same font and font-size... as if running in VTY

EDIT: setup: latest spacemacs + clojure layer with fancify symbols enabled https://practicalli.github.io/spacemacs/install-spacemacs/fancify-symbols.html https://imgur.com/a/qLlEi4H

Using font Inconsolata for Powerline

EDIT: proof that the character is included with the font https://i.imgur.com/wq53hcr.png

  • Could you clarify the problem - e.g., provide a step-by-step recipe, preferably starting from emacs -Q (no init file), saying at each step what you see that you don't like/expect, and what you would prefer. "Weird...unpredictable" doesn't tell us what you mean. – Drew Sep 5 '18 at 13:39
  • I don't think starting with emacs -Q is necessary, but I otherwise agree with Drew: please provide some example of the undesirable font-size differences, because normally Emacs already tries to keep font-sizes equal except where someone specifically asked for it to be different. Sometimes the problem is that the default font you use does not cover all the chars necessary so Emacs is forced to mix-and-match fonts and some fonts look bigger/smaller even when they officially use the same size. – Stefan Sep 5 '18 at 15:43
  • I've been asked to do this before, and it is unrealistic for me to go such lengths to come up with some minimal replicable example of the problem, to solve a minor problem. I'd like it to be solved with minimal effort. @Stefan the problem can be seen using clojure-mode with practicalli.github.io/spacemacs/install-spacemacs/… ... using Inconsolata for Powerline font, I believe it has all the chars ... imgur.com/RIgFtJO – skrat Sep 5 '18 at 16:17
  • @skrat: [ Please put the added information directly in your question rather than in comments ] I don't see any "mixed font sizes" in your imgur link, sorry. Could you give more details. Also, just posting a single picture (with text explanation pointing out where you see the size difference) should be sufficient (and preferable to a video, unless maybe the problem is time-dependent). – Stefan Sep 5 '18 at 16:31
  • The font you're using does not have the lambda symbol so a different font is used to render it. As an alternative you can use a font with decent Unicode coverage, such as DejaVu Sans Mono. See also related question emacs.stackexchange.com/questions/44213/… , although there is no real solution there either. – contemplator Sep 5 '18 at 22:27
1

No, I don't believe that there is any way to turn off glyph fallbacks. Of course I could be wrong; this is supported only by a brief examination of the Emacs code.

I looked in fontset.c which has the code for this. Specifically, the function fontset_find_font searches a fontset for the font information for a specific character. It does take a boolean parameter which suppresses the search for a fallback font. This function's caller (fontset_font), however, always calls it with the boolean first false and then if that fails calls it again with it true.

I think you'll just have to search for a more complete font for Emacs to use.

Also, the character picker does font fallback as well. You'll want to use a font viewer rather than a character picker for this task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.