Loading ...
Sorry, an error occurred while loading the content.

Font problems on Linux after upgrade

Expand Messages
  • Boris Dinkevich
    Hello everyone, I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7. Unfortunately after the update, the look&feel changed, I was able to restore
    Message 1 of 11 , Aug 31, 2006
    • 0 Attachment
      Hello everyone,

      I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
      Unfortunately after the update, the look&feel changed, I was able to restore
      most of the settings but am unable to restore the font configuration.

      My font was similar (or the same) to "Monospace" font as appears in Konsole
      app.
      But I am unable to set gvim7 to use the same font.

      Any help will be greatly appreciated

      Thanks in advance,
      Boris Dinkevich
    • Yakov Lerner
      ... Difference in fonts may be due to difference in GUI libraries that gvim is built with. Check 4th line of output of :version command, both in your old vim,
      Message 2 of 11 , Aug 31, 2006
      • 0 Attachment
        On 8/31/06, Boris Dinkevich <Boris@...> wrote:
        > Hello everyone,
        >
        > I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
        > Unfortunately after the update, the look&feel changed, I was able to restore
        > most of the settings but am unable to restore the font configuration.
        >
        > My font was similar (or the same) to "Monospace" font as appears in Konsole
        > app.
        > But I am unable to set gvim7 to use the same font.

        Difference in fonts may be due to difference in GUI libraries that
        gvim is built with. Check 4th line of output of :version
        command, both in your old vim, and in your new vim.

        For example, mine reads :version ... Huge version with GTK2 GUI.

        The vim that had font closest to Konsole possibly was Qt-based.

        Yakov
      • Boris Dinkevich
        Hello, I have used the AAP utility for installation. Is there a way to reconfigure & recompile for GTK2 (a howto/help perhaps) Thanks alot for your help Boris
        Message 3 of 11 , Aug 31, 2006
        • 0 Attachment
          Hello,

          I have used the AAP utility for installation.
          Is there a way to reconfigure & recompile for GTK2 (a howto/help perhaps)

          Thanks alot for your help
          Boris

          On 8/31/06, Robert Cussons <r.cussons@...> wrote:
          > Yakov Lerner wrote:
          > > On 8/31/06, Boris Dinkevich <Boris@...> wrote:
          > >
          > >> Hello everyone,
          > >>
          > >> I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
          > >> Unfortunately after the update, the look&feel changed, I was able to
          > >> restore
          > >> most of the settings but am unable to restore the font configuration.
          > >>
          > >> My font was similar (or the same) to "Monospace" font as appears in
          > >> Konsole
          > >> app.
          > >> But I am unable to set gvim7 to use the same font.
          > >
          > >
          > > Difference in fonts may be due to difference in GUI libraries that
          > > gvim is built with. Check 4th line of output of :version
          > > command, both in your old vim, and in your new vim.
          > >
          > > For example, mine reads :version ... Huge version with GTK2 GUI.
          > >
          > > The vim that had font closest to Konsole possibly was Qt-based.
          > >
          > > Yakov
          > >
          >
          > Hi Boris,
          >
          > I had exactly the same problem and as Yakov says it was due to the GUI
          > libraries, the old one was GTK2 GUI and when I recompiled it, it was
          > motif and the font changed as you said, when I recompiled it for GTK2
          > GUI the appearance returned to the old one.
          >
        • Yakov Lerner
          ... aap downloaded all sources whcih contain, among other things, configure script. Go to the directory of sources and do ./configure --enable-gui=gtk2
          Message 4 of 11 , Aug 31, 2006
          • 0 Attachment
            On 8/31/06, Boris Dinkevich <Boris@...> wrote:
            > Hello,
            >
            > I have used the AAP utility for installation.
            > Is there a way to reconfigure & recompile for GTK2 (a howto/help perhaps)

            aap downloaded all sources whcih contain, among other things,
            configure script. Go to the directory of sources and do
            ./configure --enable-gui=gtk2 --with-features=huge
            ./make && make install

            The --with-features=huge part is optional, up to you. Yuu can also use
            my script vim7-install.sh , attached, which doanloads latest vim sources
            & builds & instals them. With my script, command is:
            ./vim7-install.sh --enable-gui=gtk2 --with-features=huge

            To see all available configure options, do ./configure --help, or
            /vim7-install.sh --help

            Yakov
          • Boris Dinkevich
            Hello Yakov I have tried to configure manualy, but to not avail. (By the way, I have KDE) Tried compiling with: --enable-gui=gtk2 but when I try to start gvim
            Message 5 of 11 , Aug 31, 2006
            • 0 Attachment
              Hello Yakov

              I have tried to configure manualy, but to not avail.
              (By the way, I have KDE)

              Tried compiling with: --enable-gui=gtk2

              but when I try to start gvim I get the following error:
              E25: GUI cannot be used: Not enabled at compile time

              PS. I am not sure how I can start the old gvim (if its still present)
              to check the settings it was compiled with.

              Again thanks for your help,
              Boris




              On 8/31/06, Yakov Lerner <iler.ml@...> wrote:
              > On 8/31/06, Boris Dinkevich <Boris@...> wrote:
              > > Hello,
              > >
              > > I have used the AAP utility for installation.
              > > Is there a way to reconfigure & recompile for GTK2 (a howto/help perhaps)
              >
              > aap downloaded all sources whcih contain, among other things,
              > configure script. Go to the directory of sources and do
              > ./configure --enable-gui=gtk2 --with-features=huge
              > ./make && make install
              >
              > The --with-features=huge part is optional, up to you. Yuu can also use
              > my script vim7-install.sh , attached, which doanloads latest vim sources
              > & builds & instals them. With my script, command is:
              > ./vim7-install.sh --enable-gui=gtk2 --with-features=huge
              >
              > To see all available configure options, do ./configure --help, or
              > /vim7-install.sh --help
              >
              > Yakov
              >
              >
              >
            • A.J.Mechelynck
              ... [...] Configure will select the GTK2 GUI by default, provided that: a) it is installed, including development stuff; b) you have not forbidden it via
              Message 6 of 11 , Aug 31, 2006
              • 0 Attachment
                Boris Dinkevich wrote:
                > Hello,
                >
                > I have used the AAP utility for installation.
                > Is there a way to reconfigure & recompile for GTK2 (a howto/help perhaps)
                >
                > Thanks alot for your help
                > Boris
                [...]

                Configure will select the GTK2 GUI by default, provided that:
                a) it is installed, including "development" stuff;
                b) you have not forbidden it via --disable-gtk2-check
                c) you have not explicitly selected a different GUI via --enable-gui=

                For (a) you need to install the gtk2 and gtk2-devel packages (or
                whatever they are called in your Linux distribution)
                For (b) and (c) you need to REMOVE any --disable-gtk2-check or
                --enable-gui= parameter from your configure arguments.

                If you changed anything under (a), (b) or (c) above, you need to run
                "make reconfig", not in the top vim70 directory (whose Makefile has no
                "reconfig" target) but in the src/ directory, as follows:

                cd src
                make reconfig > ../make.log 2>&1
                cd ..

                This will both re-run configure with your new settings, and recompile
                Vim. Once it has finished running:

                ls -l src/vim
                (and optionally)
                less make.log

                you should see a Vim executable with today's date; if you don't, the
                make log will tell you what went wrong. If you do:

                src/vim --version |more

                Check the features that are important to you. In particular, check that
                one of the first four lines of output includes "with GTK2 GUI". If they
                are present:

                make install

                Note: If you include the GTK+2 GUI, you can also (optionally) include
                the Gnome2 interface, which will make Vim save its session transparently
                when you close the kde or Gnome window manager, and restart it when the
                window manager is restarted. For that, you need:

                a) the gnome2 and gnome2-devel packages (or whatever they are called in
                your Linux distribution)
                b) the --enable-gnome-check argument to configure.

                For instance, on my system, sourcing the following file in the bash
                shell (with the source command or a period, followed by a space and the
                filename; just the filename at the command prompt is not enough), will
                cause a subsequent make to produce a Vim with Gnome/GTK2 GUI:

                #!/bin/bash
                #
                # this file must be sourced, not run
                #
                # set environment variables
                export CONF_OPT_GUI='--enable-gnome-check'
                export CONF_OPT_PERL='--enable-perlinterp'
                export CONF_OPT_PYTHON='--enable-pythoninterp'
                export CONF_OPT_TCL='--enable-tclinterp --with-tcl=tclsh8.4'
                export CONF_OPT_RUBY='--enable-rubyinterp'
                export CONF_OPT_MZSCHEME='--enable-mzschemeinterp'
                export CONF_OPT_CSCOPE='--enable-cscope'
                export CONF_OPT_MULTIBYTE='--enable-multibyte'
                export CONF_OPT_OUTPUT='--enable-fontset'
                export CONF_OPT_FEAT='--with-features=huge'
                export CONF_OPT_COMPBY='"--with-compiledby=antoine.mechelynck@..."'

                (in case my mailer "beautified" it: each line start with either # or
                "export CONF_OPT_" without the quotes). You can use all or any of it,
                but please change at least the last line to show your name instead of
                mine ;-). Any feature not installed on your system (or whose
                "development" stuff is not installed) will be disabled by configure; to
                disable a feature for which you do have the software, replace --enable
                by --disable in the configure arguments.


                Best regards,
                Tony.
              • A.J.Mechelynck
                ... If your GUI flavour allows it, you may use ... to select your GUI font from a popup menu. If and when you find a font that suits you, you can do (assuming
                Message 7 of 11 , Aug 31, 2006
                • 0 Attachment
                  Boris Dinkevich wrote:
                  > Hello everyone,
                  >
                  > I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
                  > Unfortunately after the update, the look&feel changed, I was able to
                  > restore
                  > most of the settings but am unable to restore the font configuration.
                  >
                  > My font was similar (or the same) to "Monospace" font as appears in Konsole
                  > app.
                  > But I am unable to set gvim7 to use the same font.
                  >
                  > Any help will be greatly appreciated
                  >
                  > Thanks in advance,
                  > Boris Dinkevich
                  >

                  If your GUI flavour allows it, you may use

                  :set guifont=*

                  to select your GUI font from a popup menu. If and when you find a font
                  that suits you, you can do (assuming 'nocompatible' is set)

                  :set guifont=<Tab>

                  to see what was set, with escaping backslashes if and where necessary.
                  Copy it verbatim onto a piece of paper, and from there into your vimrc.
                  If your GUI flavour does _not_ allow ":set guifont=*", then you can
                  either recompile with a different GUI (more on that in another post of
                  mine in this thread), or "guess" how the font will be called. Now there
                  are 4 different, totally incompatible formats for the 'guifont' option,
                  and each gvim executable accepts only one of them. The following code
                  snippet (which can be placed in your vimrc) will select the right option
                  format for whatever it is you have installed:

                  if has("gui_running") " no need to set it if we ain't got it
                  if has("gui_gtk2") " GTK+2 only, not GTK+1
                  set gfn=Monospace\ 12
                  elseif has("gui_kde") " kvim is obsolete, but there are still
                  " some old versions of it lying around
                  set gfn=Monospace/12/-1/5/50/0/0/0/1/0
                  elseif has("x11") " all other X11 builds of gvim
                  set gfn=*-monospace-medium-r-normal-*-*-120-*-*-m-*-*
                  else " everything else, including Windows
                  " and non-X11 Mac builds
                  set gfn=Monospace:h12
                  endif
                  endif

                  After running that, you can do

                  :set guifont=<Tab>

                  to see what was set, and even edit the value on the command-line (then
                  hit Enter to accept the changes, Esc to cancel them); but if you want to
                  set, for instance, a different font face, you may have to shoot in the
                  dark. If and when you find what suits you, port your changes back into
                  the vimrc code snippet above.


                  Best regards,
                  Tony.
                • Yakov Lerner
                  ... You are probably missing gtk2 development libraries. On fedora, package name is gtk2-devel. On your Linux, I don t know Yakov
                  Message 8 of 11 , Aug 31, 2006
                  • 0 Attachment
                    On 8/31/06, Boris Dinkevich <Boris@...> wrote:
                    > Hello Yakov
                    >
                    > I have tried to configure manualy, but to not avail.
                    > (By the way, I have KDE)

                    You are probably missing gtk2 development libraries. On fedora,
                    package name is gtk2-devel. On your Linux, I don't know

                    Yakov




                    >
                    > Tried compiling with: --enable-gui=gtk2
                    >
                    > but when I try to start gvim I get the following error:
                    > E25: GUI cannot be used: Not enabled at compile time
                    >
                    > PS. I am not sure how I can start the old gvim (if its still present)
                    > to check the settings it was compiled with.
                    >
                    > Again thanks for your help,
                    > Boris
                    >
                    >
                    >
                    >
                    > On 8/31/06, Yakov Lerner <iler.ml@...> wrote:
                    > > On 8/31/06, Boris Dinkevich <Boris@...> wrote:
                    > > > Hello,
                    > > >
                    > > > I have used the AAP utility for installation.
                    > > > Is there a way to reconfigure & recompile for GTK2 (a howto/help perhaps)
                    > >
                    > > aap downloaded all sources whcih contain, among other things,
                    > > configure script. Go to the directory of sources and do
                    > > ./configure --enable-gui=gtk2 --with-features=huge
                    > > ./make && make install
                    > >
                    > > The --with-features=huge part is optional, up to you. Yuu can also use
                    > > my script vim7-install.sh , attached, which doanloads latest vim sources
                    > > & builds & instals them. With my script, command is:
                    > > ./vim7-install.sh --enable-gui=gtk2 --with-features=huge
                    > >
                    > > To see all available configure options, do ./configure --help, or
                    > > /vim7-install.sh --help
                    > >
                    > > Yakov
                    > >
                    > >
                    > >
                    >
                  • Boris Dinkevich
                    Hello everyone Thank you very much for your help. Unfortunately after playing more with the settings I was unable to restore the same font as were before. Is
                    Message 9 of 11 , Sep 3, 2006
                    • 0 Attachment
                      Hello everyone

                      Thank you very much for your help.

                      Unfortunately after playing more with the settings I was unable to
                      restore the same font as were before.

                      Is there possible to run the old executable & configuration as before
                      the 7 installation or do I have to upgrade/downgrade to return to the
                      old setup ?

                      Thanks again for the help
                      Boris

                      On 8/31/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:
                      > Boris Dinkevich wrote:
                      > > Hello everyone,
                      > >
                      > > I am using Mandrake 9.2 and have recently upgraded from Vim6 to 7.
                      > > Unfortunately after the update, the look&feel changed, I was able to
                      > > restore
                      > > most of the settings but am unable to restore the font configuration.
                      > >
                      > > My font was similar (or the same) to "Monospace" font as appears in Konsole
                      > > app.
                      > > But I am unable to set gvim7 to use the same font.
                      > >
                      > > Any help will be greatly appreciated
                      > >
                      > > Thanks in advance,
                      > > Boris Dinkevich
                      > >
                      >
                      > If your GUI flavour allows it, you may use
                      >
                      > :set guifont=*
                      >
                      > to select your GUI font from a popup menu. If and when you find a font
                      > that suits you, you can do (assuming 'nocompatible' is set)
                      >
                      > :set guifont=<Tab>
                      >
                      > to see what was set, with escaping backslashes if and where necessary.
                      > Copy it verbatim onto a piece of paper, and from there into your vimrc.
                      > If your GUI flavour does _not_ allow ":set guifont=*", then you can
                      > either recompile with a different GUI (more on that in another post of
                      > mine in this thread), or "guess" how the font will be called. Now there
                      > are 4 different, totally incompatible formats for the 'guifont' option,
                      > and each gvim executable accepts only one of them. The following code
                      > snippet (which can be placed in your vimrc) will select the right option
                      > format for whatever it is you have installed:
                      >
                      > if has("gui_running") " no need to set it if we ain't got it
                      > if has("gui_gtk2") " GTK+2 only, not GTK+1
                      > set gfn=Monospace\ 12
                      > elseif has("gui_kde") " kvim is obsolete, but there are still
                      > " some old versions of it lying around
                      > set gfn=Monospace/12/-1/5/50/0/0/0/1/0
                      > elseif has("x11") " all other X11 builds of gvim
                      > set gfn=*-monospace-medium-r-normal-*-*-120-*-*-m-*-*
                      > else " everything else, including Windows
                      > " and non-X11 Mac builds
                      > set gfn=Monospace:h12
                      > endif
                      > endif
                      >
                      > After running that, you can do
                      >
                      > :set guifont=<Tab>
                      >
                      > to see what was set, and even edit the value on the command-line (then
                      > hit Enter to accept the changes, Esc to cancel them); but if you want to
                      > set, for instance, a different font face, you may have to shoot in the
                      > dark. If and when you find what suits you, port your changes back into
                      > the vimrc code snippet above.
                      >
                      >
                      > Best regards,
                      > Tony.
                      >
                    • A.J.Mechelynck
                      ... It is possible to have several versions of Vim coexisting peacefully on a single system, but some precautions must be taken. - You will usually want to use
                      Message 10 of 11 , Sep 3, 2006
                      • 0 Attachment
                        Boris Dinkevich wrote:
                        > Hello everyone
                        >
                        > Thank you very much for your help.
                        >
                        > Unfortunately after playing more with the settings I was unable to
                        > restore the same font as were before.
                        >
                        > Is there possible to run the old executable & configuration as before
                        > the 7 installation or do I have to upgrade/downgrade to return to the
                        > old setup ?
                        >
                        > Thanks again for the help
                        > Boris


                        It is possible to have several versions of Vim coexisting peacefully on
                        a single system, but some precautions must be taken.

                        - You will usually want to use one of them as "default". That one must
                        come first in your $PATH. When you enter in the shell

                        which -a vim

                        you will see all "vim" executables in the $PATH. The first of those is
                        what will be called when you invoke "vim" without a path.

                        - $VIMRUNTIME must not be set outside of Vim. Each Vim executable will
                        set it to its own runtime directory.

                        - It is easiest to leave $VIM unset also. But if all vim<version>
                        directories (for each of your executables) have a common parent, you may
                        set $VIM to that common parent.

                        - On Linux, where the Vim executables are moved to somewhere in the
                        $PATH, you must give them different names.

                        Example 1, on Unix/Linux:

                        - $VIM is set to /usr/local/share/vim
                        - Vim 7.0 runtime files are in /usr/local/share/vim/vim70 and its
                        subdirectories
                        - Vim 6.4 runtime files are in /usr/local/share/vim/vim64 and its
                        subdirectories
                        - Vim 7.0 executable is /usr/local/bin/vim
                        - Vim 6.4 executable is /usr/local/bin/vim64
                        - Invoke Vim 7.0 as vim (console) or gvim (GUI); vim 6.4 as vim64
                        (console) or vim64 -g (GUI)

                        Example 2, on Windows

                        - $VIM is set to C:\Program Files\vim
                        - Vim 7.0 runtime files are in C:\Program Files\vim\vim70 and its
                        subdirectories
                        - Vim 6.4 runtime files are in C:\Program Files\vim\vim64 and its
                        subdirectories
                        - Vim 7.0 executables are C:\Program Files\vim\vim70\vim.exe and
                        C:\Program Files\vim\vim70\gvim.exe
                        - Vim 6.4 executables are C:\Program Files\vim\vim64\vim.exe and
                        C:\Program Files\vim\vim64\gvim.exe
                        - C:\Program Files\vim\vim70 is in the $PATH
                        - Invoke vim 7.0 as vim (console) or gvim (GUI); vim6.4 as
                        %VIM%\vim64\vim (console) or %VIM%\vim64\gvim (GUI

                        Example 3, on Linux

                        - $VIM is unset
                        - Vim 7.0 runtime files are in /usr/local/share/vim/vim70 and its
                        subdirectories
                        - kvim 6.2 runtime files are in /opt/kde3/share/vim/vim62 and its
                        subdirectories
                        - Vim 7.0 executable is /usr/local/bin/vim
                        - kvim 6.2 executable is /opt/kde3/bin/kvim
                        - Invoke vim 7.0 as vim or gvim, kvim 6.2 as kvim
                        - To use a common set of "system-wide" runtime files, set up
                        /opt/kde3/share/vim/vimfiles as a soft link pointing to
                        /usr/local/share/vim/vimfiles, as follows:

                        cd /opt/kde3/share/vim
                        ln -vs /usr/local/share/vim/vimfiles

                        For all the above examples, any settings in your vimrc which is accepted
                        by one version and not the other, must be bracketed appropriately in
                        ":if" blocks, testing has(...), exists(...) and/or the Vim-variable
                        "version". In particular, the 'guifont' option has 4 totally
                        incompatible settings, and each version of gvim accepts only one of
                        them. Here is an example of how to set it "portably" in your vimrc:

                        if has('gui_running') " if we ain't got it, we shouldn't set it
                        if has('gui_gtk2') " GTK+2 only, not GTK+1
                        set gfn=B&H\ LucidaTypewriter\ 12
                        elseif has('gui_kde') " kvim (obsolete, but some are still
                        " lying around)
                        set gfn=B&H\ LucidaTypewriter/12/-1/5/50/0/0/0/1/0
                        elseif has('x11') " all other X11 versions, including GTK+1
                        set gfn=*-lucidatypewriter-medium-r-normal-*-*-120-*-*-m-*-*
                        else " anything else, including Windows and
                        " non-X11 Mac
                        set gfn=Lucida_Console:h12
                        endif
                        endif


                        Best regards,
                        Tony.
                      • Yakov Lerner
                        ... There are two options here. (1) When I plan to have both vim6 and vim7, i copy (or rename) vim 6 (cp /usr/bin/vim /usr/bin/vim6) before installing vim7
                        Message 11 of 11 , Sep 3, 2006
                        • 0 Attachment
                          On 9/3/06, Boris Dinkevich <Boris@...> wrote:
                          > Hello everyone
                          >
                          > Thank you very much for your help.
                          >
                          > Unfortunately after playing more with the settings I was unable to
                          > restore the same font as were before.
                          >
                          > Is there possible to run the old executable & configuration as before
                          > the 7 installation or do I have to upgrade/downgrade to return to the
                          > old setup ?

                          There are two options here. (1) When I plan to have both vim6 and vim7,
                          i copy (or rename) vim 6 (cp /usr/bin/vim /usr/bin/vim6) before
                          installing vim7 into /usr/bin (2) If I build vim7 from sources into
                          /usr/local/bin, then I must rename vim6 either before or after
                          vim7 install (mv /usr/bin/vim /usr/bin/vim6).

                          But if you installed vim7 into /usr/bin without renaming vim6 first,
                          then you can only do (a) uninstalling vim7 (b) installing vim6
                          (c) then renaming (mv /usr/bin/vim /usr/bin/vim6) (d) then installing
                          vim7 again

                          Yakov
                        Your message has been successfully submitted and would be delivered to recipients shortly.