如何在 WSL 上安装 Powerline 字体? [英] How to install Powerline fonts on WSL?

查看:140
本文介绍了如何在 WSL 上安装 Powerline 字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用

解决方案

我是在 Ubuntu 系统中安装字体的,但是从终端渲染字符的是 Windows,所以我应该在 Windows 上安装字体(facepalm).

我关注了

我为 Powerline 选择了字体 DejaVu Sans Mono,它与 Oh My Zsh 的 robbyrussell 主题配合得很好,但还有其他选项.

运行相同的命令现在按预期呈现字符:

我用来测试 Powerline 字体的 shell 命令来自这个 GitHub gist.>

I'm using Windows Subsystem for Linux (WSL 2) with Oh My Zsh to pimp my bash, but I can't make the Ubuntu terminal render the Powerline fonts properly. Any idea on how to set up WSL to work with these fonts?

解决方案

I was installing the fonts in the Ubuntu system, but it is Windows that is rendering the characters from the terminal, so I should install the fonts on Windows (facepalm).

I followed this blog post to install the Powerline fonts on Windows, and then I had to change the font in the settings of the WSL terminal:

I selected the font DejaVu Sans Mono for Powerline, which works well with the robbyrussell theme of Oh My Zsh, but there are other options.

Running the same command now rendered the characters as expected:

The shell command I used to test the Powerline fonts came from this GitHub gist.

这篇关于如何在 WSL 上安装 Powerline 字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆