Menu

#5388 Enhancement request: enable OpenType features globally

New
nobody
None
Enhancement
2019-10-08
2018-07-18
No

Currently, it’s only possible to \override the font-features list for every single grob (okay, you can use something like snippet 443 http://lsr.di.unimi.it/LSR/Item?id=443 for automization) and for every single markup. It would be nice if you could set font features when selecting the font in the \paper block:

\paper {
   #(define fonts
     (set-global-fonts
      #:music "cadence"
      #:brace "cadence"
      #:roman "Vollkorn:liga=0&dlig&zero"
      #:factor (/ staff-height pt 20)))
}

This would set Vollkorn as roman font, disable liga (for example ff ligature), and enable dlig (for example st ligature) and slashed zero.

The suggested syntax using : and & is how it’s done in LibreOffice.

Cheers,
Malte

Discussion

  • Anonymous

    Anonymous - 2018-07-18

    +1

    In your suggestion, spaces should not be significant after the `:'.

      #:roman "Vollkorn:liga = 0 & dlig & zero"
    

    Werner

     
  • Malte Meyn

    Malte Meyn - 2018-09-18

    Hm … LibreOffice seems to accept values “on”, “off”, and any integer numbers (where 0=off, everything else=on) after the “=”. And “=on” can be omitted but there is no short form for disabling a feature. I would suggest one of the following forms and I don’t think we need more complicated options containing “=”:

    #:roman "Vollkorn: noliga & dlig & zero"
    #:roman "Vollkorn: !liga & dlig & zero"
    

    Spaces after the “:” don’t have to be significant, yes. If one has only these short options mentioned above one could even consider to omit the “&” but then one would need some of the spaces:

    #:roman "Vollkorn: noliga dlig zero"
    #:roman "Vollkorn: !liga dlig zero"
    
     

    Last edit: Malte Meyn 2018-09-18
    • Malte Meyn

      Malte Meyn - 2019-10-08

      And “=on” can be omitted but there is no short form for disabling a feature.

      Yes, there is: -liga turns liga off.