On 11/7/2022 11:58 PM, Jean Abou Samra wrote:
Surprises (2)-(4) happen because font-name is meant to be a
sledgehammer that overrides all font selection logic. In
particular, it makes \bold and \italic have no effect.
You have to use font-style instead.

On 11/8/2022 12:07 AM, Jean Abou Samra wrote:
Sorry, I was misremembering, font-style doesn't exist.
The solution is more like:

\version "2.23.80"

\paper {
  fonts =
    #(set-global-fonts
      #:roman "C059"
      #:sans "Nimbus Sans"
      #:typewriter "Nimbus Mono PS")
}

\markup \bold \sans "abcde"


Nimbus Sans is the default for #:sans, but you could
replace it with Nimbus Sans L.

Alternatively:

\version "2.23.80"

\markup \override #'(font-name . "Nimbus Sans Bold") "abcde"

Jean,

Thanks for the examples.

This is what I'm using so far at the end of my main ly file to get the fonts loaded:

   \markup \override #'(font-name . "Nimbus Sans Bold") "ABCDEFG#b in
   /NimbusSans-Bold ~/Helvetica-Bold"
   \markup \override #'(font-name . "C059 Bold") "ABCDEFG#b in
   /C059-Bold ~/Times-Bold"
   \markup \override #'(font-name . "C059") "ABCDEFG#b in /C059-Roman
   ~/Times"
   \markup \override #'(font-name . "Emmentaler-20") "ABCDEFG#b in
   Emmentaler-20

I'll translate it to hide the output, but I'll probably have to put it inside an explicit bookpart since it forces the title/composer like on the front page.

Would be nice if lilypond had a way to load a resource into the postscript file without having to produce this extra output, or sledge hammer the bold/italic styles.

So does this sort of code have to be at the end because you can't un-break the damage from the sledge hammer?

Jeff

--
o_ Jeff Olson
 (\___\/_____/)   jjocanoe
~ ~ ~ / ~ ~ ~ ~  @gmail.com

Reply via email to