MonoLisaFont / feedback

Send us your feedback regarding the MonoLisa font
86 stars 2 forks source link

[Feature request]: Implement all ligatures with calt #191

Open mikesmithgh opened 1 year ago

mikesmithgh commented 1 year ago

What feature are you proposing?

Kitty has a feature to disable ligatures only when the cursor is over them. (See https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.disable_ligatures)

I have MonaLisa - Plus installed on OSX and I am using Kitty with the following setting:

disable_ligatures cursor

When I put my cursor over a ligature, it does not disable it and display the regular characters.

I have tested this with FiraCode Nerd Font Mono and it works.

FiraCode Nerd Font Mono: Screenshot 2023-01-21 at 3 09 21 PM

MonaLisa: Screenshot 2023-01-21 at 3 10 37 PM

mikesmithgh commented 1 year ago

I looked into this a bit more, this functionality does work but the issue is that all ligatures aren't implemented with calt. For example, := <$> </> -- work as expected. So this feature request is an ask to implement all ligatures with calt.

bebraw commented 1 year ago

There is no standard for which characters belong to calt and it's up to each typeface author to decide which go in.

Can you provide an exhaustive list of the missing combinations?

bebraw commented 1 year ago

Note that on MonoLisa only spacing altering combinations are behind calt. The rest of the ligatures are behind liga so may have to enable that set separately in your terminal to access them all.

mikesmithgh commented 1 year ago

Hi @bebraw thank you for the quick reply. I now have a new found respect for fonts 😄 . I looked into FiraCode a bit and ended up forking the repo to provide a list of the ligatures which belong to calt. The documentation and video demo is here: https://github.com/mikesmithgh/FiraCode/blob/calt-test/calt-test/README.md. I have the files attached with the characters for the ligatures and calts in the forked repo. But, I'll provide the list below as well.

[w w w]                                      w w w         www   
[hyphen hyphen]                              - -           --    
[hyphen asciitilde]                          - ~           -~    
[braceleft bar]                              { |           {|    
[bracketleft bar]                            [ |           [|    
[bracketright numbersign]                    ] #           ]#    
[period period]                              . .           ..    
[period period period]                       . . .         ...   
[period period equal]                        . . =         ..=   
[period period less]                         . . <         ..<   
[period question]                            . ?           .?    
[colon colon]                                : :           ::    
[colon colon colon]                          : : :         :::   
[colon colon equal]                          : : =         ::=   
[colon equal]                                : =           :=    
[semicolon semicolon]                        ; ;           ;;    
[exclam exclam]                              ! !           !!    
[exclam exclam period]                       ! ! .         !!.   
[exclam equal]                               ! =           !=    
[exclam equal equal]                         ! = =         !==   
[question period]                            ? .           ?.    
[question question]                          ? ?           ??    
[question equal]                             ? =           ?=    
[asterisk asterisk]                          * *           **    
[asterisk asterisk asterisk]                 * * *         ***   
[asterisk greater]                           * >           *>    
[asterisk slash]                             * /           */    
[numbersign parenleft]                       # (           #(    
[numbersign braceleft]                       # {           #{    
[numbersign bracketleft]                     # [           #[    
[numbersign colon]                           # :           #:    
[numbersign exclam]                          # !           #!    
[numbersign question]                        # ?           #?    
[numbersign equal]                           # =           #=    
[numbersign underscore]                      # _           #_    
[numbersign underscore parenleft]            # _ (         #_(   
[slash asterisk]                             / *           /*    
[slash greater]                              / >           />    
[slash slash]                                / /           //    
[slash slash slash]                          / / /         ///   
[slash backslash]                            / \           /\    
[backslash slash]                            \ /           \/    
[ampersand ampersand]                        & &           &&    
[bar braceright]                             | }           |}    
[bar bracketright]                           | ]           |]    
[bar bar]                                    | |           ||    
[bar bar bar]                                | | |         |||   
[bar bar bar greater]                        | | | >       |||>  
[bar bar greater]                            | | >         ||>   
[bar greater]                                | >           |>    
[dollar greater]                             $ >           $>    
[plus plus]                                  + +           ++    
[plus plus plus]                             + + +         +++   
[plus greater]                               + >           +>    
[equal equal]                                = =           ==    
[equal equal equal]                          = = =         ===   
[greater equal]                              > =           >=    
[greater greater]                            > >           >>    
[greater greater greater]                    > > >         >>>   
[less exclam hyphen hyphen]                  < ! - -       <!--  
[less asterisk]                              < *           <*    
[less asterisk greater]                      < * >         <*>   
[less bar]                                   < |           <|    
[less bar bar]                               < | |         <||   
[less bar bar bar]                           < | | |       <|||  
[less bar greater]                           < | >         <|>   
[less dollar]                                < $           <$    
[less dollar greater]                        < $ >         <$>   
[less plus]                                  < +           <+    
[less plus greater]                          < + >         <+>   
[less equal]                                 < =           <=    
[less greater]                               < >           <>    
[less less]                                  < <           <<    
[less less less]                             < < <         <<<   
[less asciitilde]                            < ~           <~    
[less asciitilde greater]                    < ~ >         <~>   
[less asciitilde asciitilde]                 < ~ ~         <~~   
[less slash]                                 < /           </    
[less slash greater]                         < / >         </>   
[asciitilde hyphen]                          ~ -           ~-    
[asciitilde at]                              ~ @           ~@    
[asciitilde greater]                         ~ >           ~>    
[asciitilde asciitilde]                      ~ ~           ~~    
[asciitilde asciitilde greater]              ~ ~ >         ~~>   
[asciicircum equal]                          ^ =           ^=    
[percent percent]                            % %           %%    

Please let me know if you need any additional information or if I can help in anyway.

bebraw commented 1 year ago

We had a quick chat about this. A couple of notes:

mikesmithgh commented 1 year ago

Great, thank you!

adiabatic commented 1 month ago

I'd like to request that "all ligatures are turned on when calt is on" not be the default.

I juggle both MonoLisa and Monaspace Neon in my Visual Studio config, and the editor picks the first one in the list:

    "editor.fontFamily": "MonoLisa, 'Monaspace Neon', …, monospace",

For ligature settings, I settled on

    "editor.fontLigatures": "'calt' on, 'liga' off",

This turns on the texture healing provided by Monaspace's calt, but keeps MonaLisa's ligatures that turn != into something that looks more like ≠ off, a feature I've tried and disliked strongly.

If these ligatures were dumped into the calt feature, then I'd either have to put up with confusing ligatures in MonoLisa or the lack of texture healing in Monaspace, depending on what font I have available.