-
Notifications
You must be signed in to change notification settings - Fork 27
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
Font size messed up #38
Comments
No, it's a recurrent problem that I've hard time fixing. Do you use any kind of magnification on your os? |
I have the exactly the same problem in macOS with default configurations of monitor. |
@ronisbr Do you have a second monitor ? What is your version of Emacs ? |
@rougier Yes, I do! I am using Emacs 29. I will try removing the second monitor. |
Hi @rougier ! I found the problem here! Everything started to work if I change this line: (font-info (font-info (format "%s-%d" font-family font-size))) to (font-info (font-info "JetBrainsMono Nerd Font Mono")) The problem is that the name of my font does not appear to follow the expected format! By default, EDIT: I found the problem! The library is picking the default font probably at a stage where my current font is not defined. The following screenshot shows the default values: I user JetBrainsMono with size 13. The final fix for me is just to set the configuration as follows (Doom emacs):
|
Fantastic! Thanks for the very helpful debug! This size problem has plagued the library from the start without any obvious solution. Now the question is why do I not pick the right size when required? Do you know when your default font size is actually set? |
Hi @rougier ! I have no idea. Since I use Doom Emacs, it has its own method to customize the default fonts. This is the code where I set the font in Doom: https://github.com/ronisbr/doom.d/blob/25c12efa4dc90ca2b6b2824047c33fc4f2b596d4/settings/setup-theme.el#L3 It is a variable that is used to set Emacs fonts at some stage. If we manage to find a hook that runs after that, we might just add comments to the README here instructing the users to add a specific function to that hook setting the fonts in svg-tag-mode. |
I see. Then maybe a warning/howto in the README would be our best option since I don't think it's possible to have a hook on default font change. |
Re: above regarding hooks and such, for temp fix I'm doing the following: (use-package! svg-lib
:init (add-hook 'after-setting-font-hook (lambda () (setq svg-lib-style-default (svg-lib-style-compute-default))))) Which seems to alleviate the issue for me. Will try to add more debug info i've found soon (presumably same thing if using svg-tag-mode directly just replace as necessary) |
Oh, the |
I am trying to get svg-tags set up with org mode (using org-modern and doom emacs). However, I am having some issues. Here is what the tags look like:
I have looked through some of the other issues (mostly #12 and #10) and I have tried using the fork from PR #14, with no success. I am wondering if there is anything obvious that I am missing?
The text was updated successfully, but these errors were encountered: