githubnext / monaspace

An innovative superfamily of fonts for code
https://monaspace.githubnext.com
SIL Open Font License 1.1
13.23k stars 215 forks source link

Can't see monaspace on terminal #15

Closed episodman closed 1 month ago

episodman commented 8 months ago

I use gnome terminal and kitty. I am not able to find monaspace font on kitty and gnome terminal..

PThorpe92 commented 8 months ago

I can actually confirm it doesn't seem to be working on Kitty, ran fc-cache as well as fc-list to double check they were installed.

Works fine on alacritty though, awesome fonts!

mjm commented 8 months ago

Seems like something is off with the spacing. kitty is really picky about all of the characters being the same size. I tried doing the fix described here to force the spacing to be 100 on the Xenon variant, and that got kitty to be able to use it, but it didn't look right. The cursor was positioned low relative to the text, and it didn't seem like all the characters had a consistent baseline.

petejohanson commented 8 months ago

You can use dconf-editor to force GNOME Terminal font setting and it looks great there. Annoying it filters from the list though in the UI.

https://fosstodon.org/@petejohanson/111384211402484279

Finii commented 8 months ago

Maybe Panose which is missing. See also #17

egmontkob commented 8 months ago

GNOME Terminal's Preferences dialog offers to choose from the fonts where pango_font_family_is_monospace() returns true.

I believe this method looks at a certain flag defined within font files, rather than actually measuring its glyphs, but I'm not familiar with the details here.

Finii commented 8 months ago

Could not find out what pango looks for, but usually that is Panose...

def force_panose_monospaced(font):
    """ Forces the Panose flag to monospaced if they are unset or halfway ok already """
    # For some Windows applications (e.g. 'cmd'), they seem to honour the Panose table
    # https://forum.high-logic.com/postedfiles/Panose.pdf
    panose = list(font.os2_panose)
    if panose[0] == 0: # 0 (1st value) = family kind; 0 = any (default)
        panose[0] = 2 # make kind latin text and display
        logger.info("Setting Panose 'Family Kind' to 'Latin Text and Display' (was 'Any')")
        font.os2_panose = tuple(panose)
    if panose[0] == 2 and panose[3] != 9:
        logger.info("Setting Panose 'Proportion' to 'Monospaced' (was '%s')", panose_proportion_to_text(panose[3]))
        panose[3] = 9 # 3 (4th value) = proportion; 9 = monospaced
        font.os2_panose = tuple(panose)

[1] https://forum.high-logic.com/postedfiles/Panose.pdf

marcaurele commented 8 months ago

Kitty, Gnome terminal are running their own checks to see if the font is really a monospaced one or not. It's about this issue on the spacing, running fc-list :spacing=100 does not list any of the Monaspace fonts in the list, but all the ones available for the gnome terminal for example.

ToxicFrog commented 7 months ago

This also affects Konsole, although in that case you can override it by ticking show all fonts. (It still doesn't work properly on Konsole, but doing this at least lets you select it.)

alexeyten commented 7 months ago

fonts-conf doesn't think that theese fonts are monospace. So one could force it with this little config:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="scan">
        <test name="family" compare="contains">
            <string>Monaspace</string>
        </test>
        <edit name="spacing">
            <const>dual</const>
        </edit>
    </match>
</fontconfig>

Put it in ~/.config/fontconfig/conf.d/20-monaspace.conf and run fc-cache -f.

idan commented 7 months ago

Whoops, GH auto closed this when I merged #125

We'll produce a new build soon and check that this (and related issues) are solved.

kwmlodozeniec commented 6 months ago

Any idea when a new build will be produced?

kwmlodozeniec commented 4 months ago

Would it be possible to document the built process so it could be done by the community?

xf0e commented 3 months ago

Whoops, GH auto closed this when I merged #125

We'll produce a new build soon and check that this (and related issues) are solved.

Any idei when a new build wlll be produced? Or did i miss, the build insctructions to build it by myself?

Finii commented 3 months ago

Or did i miss, the build insctructions to build it by myself?

Well, I guess there are no build instructions needed, just open the .glyphs file(s) and File -> Export...

But there is no commit with anything new here, or did I miss that? In a branch maybe?

Screenshot 2024-03-25 at 13 24 15

Glyphs 3.1.2 shown, sorry that is non-free software

Edit: Probably you can open the .glyphs files with something which is not Glyphs - I have no clue (due to lack of need)

kwmlodozeniec commented 3 months ago

@Finii a number of tweaks went in since the release that is currently available.

Finii commented 3 months ago

Oh, You are right :-D

image

Edit:

But the sources are untouched:

image

kwmlodozeniec commented 3 months ago

the panos plags were set and that solves at least some issues raised all over the place image

Finii commented 3 months ago

Oh my... thats why I can not see my own commit :woman_facepalming:

image

Usually my fork is called fork and upstream is origin, maybe I had no time back then ;)

Finii commented 3 months ago

I could upload the fixed files in a branch of my fork, if that helps. Well, in fact that would not be allowed due to the RFN, strictly speaking. :grimacing:

Finii commented 3 months ago

Btw, I do not know if Panose is sufficient, another far more severe issue is

Unfortunately that is far from easily-fixable but a conceptual problem :unamused:

kwmlodozeniec commented 3 months ago

indeed, it would be great if the owners could do this or at least hand over to the community but there might be reasons beyond my understanding that could be preventing that.

heathercran commented 1 month ago

Fixed in version 1.1

ToxicFrog commented 6 days ago

Oh, You are right :-D

image

What's this a screenshot from? I find it a lot more readable than the default git log --graph.

Finii commented 5 days ago

What's this a screenshot from? I find it a lot more readable than the default git log --graph.

That's tig (git spelled backwards) https://jonas.github.io/tig/doc/tig.1.html

Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.

I usually do not like tools that do git commands for me (like lazygit), but I do use tig as git log / git show substitude and tig blame where you can easily jump the commits up and down.

All Linux distributions as well as Homebrew has packages.

To only other git tool I use is fugitive the vim plugin (in neovim). I rather like to interact with git directly.