lilypond-user
[Top][All Lists]
Advanced

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

Re: Change color for some symbols in a sylable


From: Светлана
Subject: Re: Change color for some symbols in a sylable
Date: Wed, 11 Jan 2012 12:54:48 +0400

11.01.2012, 03:01, "David Nalesnik" <address@hidden>:
Hi Svetlana,

Thanks for the explanation and the examples!  I think I understand better, and it's not as difficult as I first thought. (At least, I hope so...)
I've attached a new version of the functions.  They work fine with my "Twinkle, twinkle..." example.  Hopefully they will work with your file, too.  I couldn't figure out how to get the font running in LilyPond to check it myself :(
Let me know if this does what you want or if you run into any problems.
Best,
David 
Hi, David!
Yeah, this works like I wanted, but there is one problem. The problem is called UTF-8. All is fine if you have latin lyrics and symbols to color from ANSI encoding. Then if you add cyrillic lyrics - the function messes all the letters. If you try to add some cyrillic symbols to color - lilypond crashes.
  I send you your "Twinkle, twinkle" example with cyrillic lirycs. I converted it from ANSI to UTF-8 (without BOM), otherwise it doesn't work with cyrillic letters at all. 
Steps to reproduce:
1) Compile the file I've sent you - you should see normal cyrillic text below the staff (if you have Arial Normal font).
2) Uncomment line with \colorSymbols function call and compile - text will change to strange symbols. As I remember from my PHP expierence this happens when you work with full unicode text and non-unicode functions - function takes just the first byte of symbol codes and not the other.
3) Add some cyrillic letters to function parameters and compile - lilypond crashes :(
I don't know if Scheme is capable of dealing with Unicode easily and if you have any expierience with it, but, please, give it a try. Btw, I've checked your first function. It works with cyrillic letters correctly (just don't forget to convert the files to UTF-8).
Thank you very much,
Svetlana.

Attachment: colorize-list-utf.ly
Description: Binary data


reply via email to

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