2005-11-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/define-markup-commands.scm (pad-to-box): new markup command.
+
* scm/define-grobs.scm (all-grob-descriptions): set thickness to
1.0.
(all-grob-descriptions): don't shift RehearsalMark arbitrarily.
@itemize @bullet
+@item Texts set in a TrueType font are now kerned.
-@item LilyPond does no longer link to kpathsea for the @TeX{} backend.
-This makes the @TeX{} backend more easily usable on various systems.
+@item Using the @TeX{} no longer requires linking or dynamically
+opening the kpathsea library, making the backend more easily usable on
+various systems.
This fix was sponsored by Christian Ebert.
--- /dev/null
+\version "2.7.20"
+
+\header {
+ texidoc = "Text set in TrueType Fonts that contain kerning tables, are kerned. "
+}
+
+\markup {
+% \override #'(font-name . "VeraSerif")
+ \override #'(padding . 0)
+ \override #'(thickness . 0.00001)
+ \override #'(box-padding . 0.0)
+ \column {
+ \line { \pad-to-box #'(0 . 50) #'(0 . 2) \line { With kerning: }
+ \override #'(font-size . 12)
+ \box { VAVAVA } }
+ \line {
+ \pad-to-box #'(0 . 50) #'(0 . 2) \line { Without kerning: }
+ \override #'(font-size . 12)
+ \override #'(word-space . 0.0) \line { \box V \box A \box V \box A \box V \box A } }
+ }
+}
+
"Draw a box round @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
thickness and padding around the markup."
+
(let* ((th (chain-assoc-get 'thickness props 0.1))
(size (chain-assoc-get 'font-size props 0))
(pad (* (magstep size)
(text-dir (chain-assoc-get 'text-direction props RIGHT))
)
-
(if (= text-dir LEFT)
(set! stencils (reverse stencils)))
x y)))
+(def-markup-command (pad-to-box layout props x-ext y-ext arg) (number-pair? number-pair? markup?)
+ "Make @var{arg} take at least @var{x-ext}, @var{y-ext} space"
+
+ (let*
+ ((m (interpret-markup layout props arg))
+ (x (ly:stencil-extent m X))
+ (y (ly:stencil-extent m Y)))
+
+
+ (ly:make-stencil (ly:stencil-expr m)
+ (interval-union x-ext x)
+ (interval-union y-ext y))))
+
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; property
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
size cid?
w-x-y-named-glyphs)
- (format #f "gsave 1 output-scale div 1 output-scale div scale
- /~a ~a ~a scalefont setfont\n~a grestore"
+ (format #f "gsave
+ /~a ~a ~a output-scale div scalefont setfont\n~a grestore"
postscript-font-name
(if cid?
" /CIDFont findresource "
" findfont")
-
size
(apply
string-append
(g (cadddr item))
(prefix (if (string? g) "/" "")))
- (if (and (= 0.0 x)
- (= 0.0 y))
- (format #f " ~a~a glyphshow\n" prefix g)
-;; (format #f " gsave ~a~a glyphshow grestore ~a 0 rmoveto \n" prefix g w)
- (format #f " ~a ~a rmoveto ~a~a glyphshow\n"
- x y
- prefix
- g))))
+ (format #f " gsave ~a~a glyphshow grestore ~a ~a rmoveto \n" prefix g (+ w x) y)
+ ))
w-x-y-named-glyphs))))
(define (grob-cause offset grob)