lilypond-user
[Top][All Lists]
Advanced

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

Re: color individual characters


From: Aaron Hill
Subject: Re: color individual characters
Date: Sun, 05 Jun 2022 14:56:59 -0700

On 2022-06-05 1:13 pm, Лысов Дмитрий wrote:
Hi. How to color individual characters in the UNICODE encoding text?

The examples did not come through for me--perhaps an encoding issue between our mail clients, or my mail server is just being overly paranoid about attachments that could contain executable code.

--

Here is an example of applying unique colorization to a character and a combining character:

%%%%
\version "2.22.0"

\markup {
  \concat {
    jalape
    \with-color #blue n
    \with-color #red \char ##x0303
    o
  }
}
%%%%

The above usage pattern does break up the input into separate pieces. As such, Pango observes the 'n' distinctly from the combining tilde, effectively preventing it from converting to the pre-composed glyph 'ñ'. (In the case above, we would not want the pre-composed glyph anyway because we desire independent coloring.)

Fonts with more advanced replacement rules for handling complex scripts and ligatures will not work, as Pango needs to see the whole input to apply the proper logic. And at that point, \with-color is only left with the option to apply color to the entire resulting stencil.


-- Aaron Hill

Attachment: color-combining-characters.cropped.png
Description: PNG image


reply via email to

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