代码之家  ›  专栏  ›  技术社区  ›  Tono Nam

无法在vscode上安装字体以使zsh正确显示(使用linux manjaro)

  •  0
  • Tono Nam  · 技术社区  · 4 年前

    当我使用ubuntu时,这个问题帮助我解决了这个问题:

    My terminal in VSCode has a tiny font after installing zsh and changing font style?

    使用manjaro时,我无法使其工作。事实上安装之后 Menlo for Powerline 字体我的终端如下所示: enter image description here (图片看起来很模糊,因为我缩小了尺寸)

    我尝试使用的字体是 电力线的门罗 可以从这里下载: https://github.com/abertsch/Menlo-for-Powerline

    这就是我正在做的:

    cd ~/Downloads
    git clone https://github.com/abertsch/Menlo-for-Powerline.git
    
    # for some reason I do not have this directory
    # I have also perform the same steps using the directory /usr/share/fonts
    mkdir ~/.fonts
    
    # copy all the fonts to the new directory just created
    cp ~/Downloads/Menlo-for-Powerline/* ~/.fonts/
    
    # make sure fonts are in here
    cd ~/.fonts
    ls
    
    # update fonts cache
    fc-cache -vf ~/.fonts
    

    然后我设置了背景 terminal.integrated.fontFamily

    "terminal.integrated.fontFamily": "Menlo for Powerline",
    

    当我这么做的时候,vscode会显示警告

    “终端只支持单空间字体。请确保重新启动VS 如果这是新安装的字体,请输入代码。"

    我重新启动VS代码,字体仍然无法使用!我想我的问题是我把字体放错了地方。Ubuntu将字体放在~/。但是曼哈罗呢?

    0 回复  |  直到 4 年前
        1
  •  1
  •   Vaibhav Soni    4 年前

    尝试将字体复制到/usr/share/fonts/TTF。您还可以尝试安装字体(nautilus和nemo等文件管理器支持这些字体)