[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with a font
From: |
Torsten Hämmerle |
Subject: |
Re: Problem with a font |
Date: |
Thu, 5 Apr 2018 10:20:30 -0700 (MST) |
Walter Garcia-Fontes wrote
> I get an error in your code for "slanting" the font: [...]
Hi Walter,
The ly:stencil-outline command did not exist in 2.18.2 yet.
Here's a downgraded version of \slanted:
%%%%% BEGIN OF SNIPPET
#(define-markup-command
(slanted layout props arg)
(markup?)
#:category font
#:properties ((slant-angle 12))
"Fake a slanted font"
(let* ((alpha-rad (* 0.5 (acos (tan (* (/ PI -180) slant-angle)))))
(alpha-deg (* (/ 180 PI) alpha-rad))
(stencil
(if (markup? arg)
(interpret-markup layout props arg)
empty-stencil))
(x-ext (ly:stencil-extent stencil X))
(y-ext (ly:stencil-extent stencil Y)))
(ly:make-stencil
(ly:stencil-expr
(ly:stencil-scale
(ly:stencil-rotate
(ly:stencil-scale
(ly:stencil-rotate
(ly:make-stencil (ly:stencil-expr stencil) (cons 0 0) (cons 0 0))
45 0 0)
1
(* (tan alpha-rad)))
(* (- alpha-deg)) 0 0)
(* (sqrt 2) (cos alpha-rad)) (/ 0.5 (sqrt 0.5) (sin alpha-rad))))
x-ext y-ext)))
%%%%% END OF SNIPPET
HTH,
Torsten
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
- Problem with a font, Walter Garcia-Fontes, 2018/04/02
- Re: Problem with a font, Thomas Morley, 2018/04/03
- Re: Problem with a font, Walter Garcia-Fontes, 2018/04/03
- Re: Problem with a font, Thomas Morley, 2018/04/03
- Re: Problem with a font, Walter Garcia-Fontes, 2018/04/03
- Re: Problem with a font, Abraham Lee, 2018/04/03
- Re: Problem with a font, Walter Garcia-Fontes, 2018/04/03
- Re: Problem with a font, Thomas Morley, 2018/04/03
- Re: Problem with a font, Walter Garcia-Fontes, 2018/04/03
- Re: Problem with a font, Thomas Morley, 2018/04/03
- Re: Problem with a font,
Torsten Hämmerle <=
- Re: Problem with a font, Walter Garcia-Fontes, 2018/04/05
- Re: Problem with a font, Torsten Hämmerle, 2018/04/05
- Re: Problem with a font, Walter Garcia-Fontes, 2018/04/06
- Re: Problem with a font, Thomas Morley, 2018/04/06
- Re: Problem with a font, Malte Meyn, 2018/04/03
- Re: Problem with a font, Simon Albrecht, 2018/04/04
Re: Problem with a font, Andrew Bernard, 2018/04/05