contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.47k stars 107 forks source link

(Windows) Font family doesn't change #452

Open MordechaiHadad opened 3 years ago

MordechaiHadad commented 3 years ago

So i'm trying to change the font family for contour to JetBrains mono nerd font(the name in windows font searcher is JetBrainsMono Nerd Font) tried even to other font families such as Consolas etc but the font won't change even on contour restart

Environment

Steps to Reproduce

Download jetbrains mono from the nerd font website and try to change it on windows.

christianparpart commented 3 years ago

Hey. Let me try to repro that. Thanks for the report. :)

christianparpart commented 3 years ago

Just checked. Ok the default configuration is something missing.

Can you set the font locator to DirectWrite? Most likely you are using fontconfig.

I should make the platform native one the default.

MordechaiHadad commented 3 years ago

Just checked. Ok the default configuration is something missing.

Can you set the font locator to DirectWrite? Most likely you are using fontconfig.

I should make the platform native one the default.

Works thank you very much but one glitch i guess i face is nerd fonts look a little bit weird: Windows Terminal: Contour:

Windows Terminal font settings: Font Family: JetBrains Mono Nerd Font Font Weight: Normal

Contour font settings: Font Family: JetBrainsMono Nerd Font Font Weight: normal Font Slant: normal

uspasojevic96 commented 3 years ago

try setting the font family to: JetBrainsMono Nerd Font Mono (note the additional Mono at the end) and change the font weight to regular if that doens't fix it

MordechaiHadad commented 3 years ago

try setting the font family to: JetBrainsMono Nerd Font Mono (note the additional Mono at the end) and change the font weight to regular if that doens't fix it

Makes it even worse: Font Weight: regular Font Family: JetBrainsMono Nerd Font Mono

uspasojevic96 commented 3 years ago

well @christianparpart font family look up isn't working properly most likely

christianparpart commented 3 years ago

i am using JetBrains Mono NF Mono in fact, too. Will be using Windows ASAP to compare and check :)

MordechaiHadad commented 3 years ago

i am using JetBrains Mono NF Mono in fact, too. Will be using Windows ASAP to compare and check :)

A man of culture

uspasojevic96 commented 3 years ago

i am using JetBrains Mono NF Mono in fact, too. Will be using Windows ASAP to compare and check :)

A man of culture

The only thing that JetBrains made that doesn't suck is the font

MordechaiHadad commented 3 years ago

i am using JetBrains Mono NF Mono in fact, too. Will be using Windows ASAP to compare and check :)

A man of culture

The only thing that JetBrains made that doesn't suck is the font

Debatable

whisperity commented 3 years ago

@MordechaiHadad Did you download the "Windows compatible" version of the NerdFont?

MordechaiHadad commented 3 years ago

@MordechaiHadad Did you download the "Windows compatible" version of the NerdFont?

I think I did it works fine with Windows Terminal.

data-man commented 3 years ago

Something similar but worse... System's fontconfig (2:2.13.94-1), freetype2 (2.11.0-4), harfbuzz (3.0.0-1), Qt5 (5.15.2+kde+r237-1), Unifont (ttf-unifont 14.0.01-1). Default contour.yml with:

family: "Unifont"
emoji: "Unifont"

It's ok. But with

strict_spacing: false

crashes Contour. :( But :) with

family: "Unifont abcdefgh" # any word

is ok.

trackd commented 9 months ago

any news on this issue?

I got it somewhat working using the following config:

        font:
            size: 13
            locator: DirectWrite
            text_shaping:
                engine: DirectWrite
            builtin_box_drawing: true
            render_mode: gray
            strict_spacing: true
            regular:
                family: "JetBrainsMono Nerd Font Mono"
                weight: Regular
                slant: normal
            emoji: "JetBrainsMono Nerd Font Mono"

wt: image

contour: image

the font glyphs work fine in all other applications, but VSCode does have the same spacing in the prompt, so not sure whats up with that.

glyphs used

$Emoji            = @{
    nf_fae_comet                   = [char]0xE26D # 
    nf_md_arrange_bring_forward    = "`u{f003d}" # 󰀽
    nf_fa_folder_open_o            = [char]0xF115 # 
    nf_md_subdirectory_arrow_right = "`u{f060d}" # 󰘍
    nf_warn_icon                   = [char]0x26A0 # ⚠
    nf_oct_hourglass               = [char]0xf4e3 # 
    nf_folder_icon                 = [char]0xe5ff # 
    nf_success_icon                = [char]0xf42e # 
    nf_pom_internal_interruption   = "`u{e009}" # 
    nf_md_home                     = "`u{f02dc}" # 󰋜
    nf_pl_left_hard_divider        = [char]0xE0B0  # 
    nf_pl_right_hard_divider       = [char]0xE0B2 # 
    nf_pl_left_soft_divider        = [char]0xE0B1 # 
    nf_pl_right_soft_divider       = [char]0xE0B3 # 
    nf_ple_right_half_circle_thick = [char]0xE0B4 # 
    nf_ple_left_half_circle_thick  = [char]0xE0B6 # 
    nf_md_powershell               = "`u{f0a0a}" # 󰨊
    nf_seti_powershell             = "`u{e683}" # 
    nf_cod_terminal_powershell     = "`u{ebc7}" # 
    nf_seti_play_arrow             = "`u{e602}" # 
    nf_fa_exclamation              = [char]0xf12a # 
    nf_md_exclamation              = "`u{f0205}" # 󰈅
    nf_cod_error                   = "`u{ea87}" # 
    nf_seti_error                  = "`u{e654}" # 
    nf_md_plex                     = "`u{f06ba}" # 󰚺
    nf_fae_real_heart              = "`u{e23a}" # 
    nf_stopwatch                   = "`u{23F1}" # 󰓣
    nf_dev_code                    = "`u{e796}" # 
    minispace                      = [char]0x2009 # mini space
}

the minispace seem to break alot of stuff so had to disable that.