[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inter-letter spacing?
From: |
Thomas Morley |
Subject: |
Re: inter-letter spacing? |
Date: |
Mon, 15 Jul 2019 22:14:11 +0200 |
Am Mo., 15. Juli 2019 um 21:37 Uhr schrieb David Kastrup <address@hidden>:
>
> Werner LEMBERG <address@hidden> writes:
>
> >> any idea how to realize inter-letter spacing? Has someone already
> >> written a macro like
> >>
> >> \markup { \letter-spacing #0.1 "foobar" }
> >>
> >> which should be equivalent to
> >>
> >> \markup { \concat { "f" \hspace #0.1
> >> "o" \hspace #0.1
> >> ...
> >> "a" \hspace #0.1
> >> "r" } }
> >>
> >> ? A google search didn't come up with a solution...
> >
> > Actually, I wonder whether this is possible at all currently. The
> > above is a very simplistic solution, completely ignoring kerning,
> > which should be retained.
> >
> > It seems that we would need a Scheme interface to the
> > `pango_attr_letter_spacing_new' function, which isn't used yet within
> > LilyPond...
> >
> > PS: Right now, I would be thankful for a pointer to this simplistic
> > solution :-)
>
> \markup \override #'(word-space . 0.4)
> \line { #(map! string (string->list "foobar")) }
This will fail with a pango-error for args like "fööbar":
(process:11556): Pango-WARNING **: 22:04:29.548: Invalid UTF-8 string
passed to pango_layout_set_text()
warning: no glyph for character U+FFFD in font
`/usr/share/texmf/fonts/opentype/public/tex-gyre/texgyreschola-regular.otf'
With my lily-guilev2 build it works out of the box.
For guilev1 one would likely need something like Arnold's code. Most
recent version probably here:
https://archiv.lilypondforum.de/index.php/topic,1152.msg11560.html#msg11560
Maybe something newer/superior out there?
Cheers,
Harm