polyipseity / obsidian-terminal

Integrate consoles, shells, and terminals inside Obsidian.
GNU Affero General Public License v3.0
163 stars 7 forks source link

Set font #11

Closed legolasdimir closed 1 year ago

legolasdimir commented 1 year ago

I am using oh my posh to customize my prompt in PowerShell. Is there a way to get the plugin to recognize my font set in the PowerShell console or specify it in the plugin? Or is this part of the 'terminal styling' that is on the to-do list? As of right now my prompt shows broken characters when it loads in this plugin.

image

polyipseity commented 1 year ago

Yes, setting font is part of the terminals styling in the todos. There are a lot of styles which require a separate setting for each, which is why I haven't done this yet.

I will aim to add the font-related style settings first in the next release then.

legolasdimir commented 1 year ago

I am no longer seeing the to-do list on the main page.. does this mean this was implemented? If so how do I set it up or is there documentation for it somewhere that I can refer to?

polyipseity commented 1 year ago

Sorry that it took this long. The latest version (v3.8.0) should support setting the font (in a not-very-user-friendly way for now):

  1. Open the profile editing modal.
  2. Click on the Edit button labeled Data. It should open up a new modal in which there is a large textbox.
  3. You should see terminalOptions inside the text area labeled Data.
  4. Replace this in the text area (replace LiterationMono NF with the name of your font):
    "terminalOptions": {},

    to

    "terminalOptions": {
        "fontFamily": "LiterationMono NF"
    },
  5. Then save the profile and start a new terminal with the new profile. The fonts should work now.

I will add some UI to make this easier in the future.