onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.83k stars 281 forks source link

DejaVu Sans Mono font displayed in italic. #3366

Open npes-95 opened 3 years ago

npes-95 commented 3 years ago

oni2 : 0.5.9-nightly macos: 10.15.7

After setting "editor.fontFamily": "DejaVu Sans Mono", all text in the editor is displayed in italic type, rather than the normal type.

Output from oni2 --debug -f --log-filter "*Font*":

[INFO]  [ 0.187s] Revery.FontCache : Loaded: JetBrains Mono
[INFO]  [ 0.225s] Oni2.Service.Font : Loading font: DejaVu Sans Mono Normal 13.000000 1
[INFO]  [ 0.229s] Revery.FontCache : Loaded: DejaVu Sans Mono
[INFO]  [ 0.233s] Revery.FontCache : Loaded: DejaVu Sans Mono
[INFO]  [ 0.235s] Oni2.Service.Font : Loading font: DejaVu Sans Mono Normal 13.000000 1
2021-04-03 19:13:20.478 Oni2_editor[4797:116664] Setting Updater automatic checks: 1
2021-04-03 19:13:20.478 Oni2_editor[4797:116664] Setting Updater feed URL: https://v2.onivim.io/appcast?channel=master&licenseKey=&platform=macos
[INFO]  [ 0.465s] Revery.FontCache : Loaded: Inter UI
[INFO]  [ 0.469s] Revery.FontCache : Loaded: Font Awesome 5 Free
[INFO]  [ 0.471s] Revery.FontCache : Loaded: Inter UI
[INFO]  [ 0.473s] Revery.FontCache : Loaded: Font Awesome 5 Free
[INFO]  [ 0.475s] Revery.FontCache : Loaded: Inter UI
[INFO]  [ 0.477s] Revery.FontCache : Loaded: Inter UI
[INFO]  [ 0.478s] Revery.FontCache : Loaded: codicon
[INFO]  [ 0.530s] Revery.FontCache : Loaded: seti
[INFO]  [ 9.706s] Revery.FontCache : Loaded: Inter UI
bryphe commented 3 years ago

Thanks for logging the issue, @npes-95 !

I tried reproducing it (I have a copy of DejaVu Sans Mono installed as well) - but not seeing the same issue: image

I wonder if there is a difference in the version I have installed, versus the one you have? It's curious that mine doesn't have an italic variant at all, for example, so it could be masking the issue.

A few things that might help narrow this down: 1) Are there any other configuration.json settings that could impact the font? Might be helpful to see the entire file, just in case 2) Does this occur for built-in fonts - like Menlo or Monaco? 3) What sort of theme are you using? Is it the default, or another one?

A screenshot would be helpful too, if possible

npes-95 commented 3 years ago

Hi @bryphe, thanks for taking the time to investigate this! I installed the font from the developer's website, which also gave me a bunch of other fonts, including italic (Oblique I guess?). Here's all I have installed:

Screenshot 2021-04-06 at 19 20 09

Here's my current config, with Nord theme installed:

{
  "workbench.colorTheme": "Nord",
  "editor.detectIndentation": true,
  "editor.fontFamily": "DejaVu Sans Mono",
  "editor.fontSize": 13,
  "editor.largeFileOptimizations": true,
  "editor.highlightActiveIndentGuide": true,
  "editor.indentSize": 4,
  "editor.insertSpaces": true,
  "editor.lineNumbers": "on",
  "editor.matchBrackets": true,
  "editor.minimap.enabled": true,
  "editor.minimap.maxColumn": 120,
  "editor.minimap.showSlider": true,
  "editor.renderIndentGuides": true,
  "editor.renderWhitespace": "none",
  "editor.rulers": [],
  "editor.tabSize": 4,
  "editor.zenMode.hideTabs": true,
  "editor.zenMode.singleFile": true,
  "files.exclude": [ "_esy", "node_modules", ".git" ],
  "workbench.activityBar.visible": true,
  "workbench.editor.showTabs": true,
  "workbench.editor.enablePreview": true,
  "workbench.iconTheme": "vs-seti",
  "workbench.sideBar.location": "left",
  "workbench.sideBar.visible": true,
  "workbench.statusBar.visible": true,
  "workbench.tree.indent": 2,
  "vim.useSystemClipboard": [ "yank" ]
}

Here's a some screenshots with system fonts for comparison:

Screenshot 2021-04-06 at 19 31 23

Screenshot 2021-04-06 at 19 31 43

Screenshot 2021-04-06 at 19 31 58

Lastly, disabling the italic/oblique font fixes the problem:

Screenshot 2021-04-06 at 19 38 12