polacode icon indicating copy to clipboard operation
polacode copied to clipboard

Polacode not using my set font

Open yankyhoffman opened this issue 5 years ago • 9 comments

I am using vscode on Ubuntu (19.04), with font Office Code Pro D and theme Monokai, and Polacode is not using my set font.

here is a screenshot of my issue image (Note the double underscores)

here is the exported png (I resized the borders before exporting) code

Originally posted by @yankyhoffman in https://github.com/octref/polacode/issues/19#issuecomment-538071051

yankyhoffman avatar Oct 03 '19 18:10 yankyhoffman

does it work if you set editor.fontLigatures: true?

kufii avatar Oct 04 '19 20:10 kufii

Nope, I tried setting fontLigatures to true but it didn't help

yankyhoffman avatar Oct 04 '19 21:10 yankyhoffman

Nope, I tried setting fontLigatures to true but it didn't help

WARNING: This is not a solution, it's a hack, however works If you REALLY want to use your font, open this file C:\Users\[YOUR USER NAME HERE]\.vscode\extensions\pnp.polacode-0.3.4\webview\index.html

This is the extension directory under windows 10. However, other systems(Ubuntu, etc. ) may have a similar location

Add your font, right after font-family: at line 74, remember to add ", ", and if there are any space in your font name, use quotation marks. <div id="snippet" style="color: #d8dee9;background-color: #2e3440;font-family: 'your font here',SFMono-Regular, ......

Line number may differ, but div id must be "sinppet"

Disable the extension, re-enable it, then restart VSCode, it works.

Maxwell-Lyu avatar Nov 04 '19 13:11 Maxwell-Lyu

Thanks for the hack! works perfectly!

yankyhoffman avatar Nov 04 '19 16:11 yankyhoffman

Didn't expect, but this hack works like a charm.

gowrizrh avatar Nov 07 '19 09:11 gowrizrh

my PR fixes this, but while we're waiting for this to be merged, I made a project inspired by polacode that you can use while we wait for it to be merged?

https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap

kufii avatar Nov 27 '19 16:11 kufii

my PR fixes this, but while we're waiting for this to be merged, I made a project inspired by polacode that you can use while we wait for it to be merged?

https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap

great alternative for anybody else running into issues

xy137 avatar Dec 07 '19 01:12 xy137

Hack from @Maxwell-Lyu worked. Note you can use "Extensions: Open Extensions Folder" from VS Code command palette then navigate to pnp.polacode-* folder and continue editing the file as described by Maxwell above.

techieshark avatar Jan 25 '20 05:01 techieshark

Why isn't it merged? really annoying bug tbh. I rather install a fork than mess around with hacks for something so simple. Thanks @kufii.

adi518 avatar Dec 31 '20 12:12 adi518