lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fonts in markup


From: Jonatan Liljedahl
Subject: Re: fonts in markup
Date: Wed, 13 Apr 2005 20:03:51 -0300

On Wed, 13 Apr 2005 16:49:56 +0200
Han-Wen Nienhuys <address@hidden> wrote:

> On Wed, 2005-04-13 at 16:07 -0300, Jonatan Liljedahl wrote:
> > Is it possible to choose different fonts in markup textscript?
> > 
> > This is what I came up with, but I guess it only works with the
> > postscript backend:
> > 
> 
> try 
>                 
>                 {
>                   \override Staff.TimeSignature  #'font-name =
>                   #"Times"
>                   \time 3/4
>                   \set Score.skipBars = ##t
>                 
>                                               % use font-name putri8r for 
> Utopia
>                                               Italic :
>                   
>                   \override Staff.MultiMeasureRestText #'font-name =
>                 #"LuxiMono"
>                   R1*21^"Rest in LuxiMono"
>                 
>                   c'1_\markup {
>                     \override #'(font-name . "Utopia Bold")
>                       \override #'(font-size . 4)
>                         { This text is in large Utopia Bold }
>                   }
>                 }
> 
> for tweaking the font-size, you will need current CVS, as I just fixed
> a bug.

It only worked for some fonts. When trying "Times" I got an error
message:
warning: No PS font name for font
`/Files/Fonts/75dpi/timR24-ISO8859-1.pcf.gz'
warning: FreeType face has no PostScript font name.

Trying other fontnames gives me plain Helvetica font. Same with Symbol
or Dingbats.
Could it be some problem with Pango?

And regarding fonts, how can I use another font (Symbol or Dingbats)
instead of the standard feta music font in the example below?

#(define (cross-callback callback)
   (define (cross-stencil grob)
     (let* ((cross (ly:font-get-glyph
              (ly:get-default-font grob) "noteheads.s2cross"))
            (s (callback grob))
            (sx (ly:stencil-extent s 0))
            (sy (ly:stencil-extent s 1))
            (cx (ly:stencil-extent cross 0))
            (xadj (/ (interval-length cx) 2))
            (midy (+ (car sy) (/ (interval-length sy) 2))))
        (set! s (ly:stencil-add s 
            (ly:stencil-translate cross (cons (- xadj) midy))))
       (ly:make-stencil (ly:stencil-expr s) sx sy)))
   cross-stencil)

stemCross = \once \override Stem  #'print-function
    = #(cross-callback Stem::print)

/Jonatan    -=( http://kymatica.com )=-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]