You are not logged in.
Pages: 1
I'm having a slight issue with using a specific font in Gvim. Here's the problem. When I open Gvim and select this font, it displays fine and works without any problem whatsoever. But when I use this line in my .gvimrc file,
set guifont=Adore64\ 6
and I open up a new session of Gvim, it results in garbage characters.
Now, I've tried fontforge to no avail, and of course I've spent time googling for a solution but haven't been able to solve it. I did find something about Gvim not being able to display non-monospace fonts or something along those lines, but if that's the case, why does the font display just fine if i manually change it once I've opened a new session?
Offline
maybe you missing a \ from my gvimrc
set guifont=\ProFont\ 10
Offline
maybe you missing a \ from my gvimrc
set guifont=\ProFont\ 10
Hmm, that didn't seem to make a difference. Still getting garbage characters.
Offline
Go back into Gvim and select the font from the drop down menu. Then type
:set guifont
and see how Gvim is setting the font itself. Then fix your own to match.
Offline
Go back into Gvim and select the font from the drop down menu. Then type
:set guifont
and see how Gvim is setting the font itself. Then fix your own to match.
That's how I figured out what to put in my .gvimrc file. When I issue said command, I get the line:
guifont=Adore64 6
which is the exact same as the one in my .gvimrc.
Offline
I see, the issue is the space. You may be able to defeat it this way:
set guifont='Adore64 6'
Offline
I see, the issue is the space. You may be able to defeat it this way:
set guifont='Adore64 6'
No luck with that. Gives me an unknown error of the '6'. However it seems to successfully treat the escape sequence \ (space) correctly since at least the size seems to be right. Hmm.
Offline
I'm sorry for the wild goose chase then.
Last couple stabs in the dark^H^H^H questions:
Can you specify the font without the size successfully? (ie, :set guifont=Adore64)
Does it work when you specify a different font size?
What happens if you start from a given font, and manually try to set the guifont while gvim is running?
What is vim's encoding set to (:set encoding)? Does changing that do anything to help?
Last edited by Morrad (2012-11-09 01:05:31)
Offline
I'm sorry for the wild goose chase then.
Last couple stabs in the dark^H^H^H questions:
Can you specify the font without the size successfully? (ie, :set guifont=Adore64)
Does it work when you specify a different font size?
What happens if you start from a given font, and manually try to set the guifont while gvim is running?
What is vim's encoding set to (:set encoding)? Does changing that do anything to help?
No worries man, really appreciate the help. As for those questions.
No luck there
Nope, tried 8, 10, 12 as well as 6, but still getting garbage characters (Size changes though).
That works
It's currently set to 'encoding=utf-8', and changing it to =iso8859 or =Latin1, didn't seem to work either.
It's strange because if I'm able to set it manually once Gvim is opened you would assume the exact same command would work in the .gvimrc file. And just in case there might be some conflicting commands or something, here's my full .gvimrc file.
colorscheme waspy
set nu!
set ts=4
set lines=40
set columns=100
set guifont=Adore64\ 6
set sw=4
set cin
set cinw=if,else,while,do,for,switch
syntax on
set syntax=c
Offline
I have a guess as to what may be causing problems.
Leave your .gvimrc the way you have it now, and open up a plain text file that won't have syntax highlighting. Make a new one if necessary. My hunch is that this should work. You may be right about some other settings causing problems with the font settings, specifically the syntax highlighting.
Fixing this would be as simple as moving setting the font to the very bottom of the configuration so that it is the last thing that gets set. (Note: Give this a try even assuming my hunch above is wrong).
Offline
Waspy, did you figure it out? What was the root cause?
Offline
Pages: 1