• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pango support multiline
#1
Thanks for adding pango support it going to make my chordpro files much more useful, vcolour coding parts ? ??  
One question is it by design that spans are limited to a single line, or have I found a bug ..... if I code my file like 
Code:
<span foreground="red"> [D]When I wake up, yeah, I know I'm gonna be,
I'm gonna [G]be the man who [A]wakes up next to [D]you.
[D]When I go out, yeah, I know I'm gonna be
</span> 

Only the first line is in red text

Thanks for all your hard work.
Reply
#2
In ChordPro, the markup is per line. So you must repeat it for subsequent lines.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#3
Thanks for clarifying Johan, a bit more effort but I can live with that for the additional functionality. Might have to write myself a little script to do the duplication ?
Reply
#4
If it is just the colour (or size, or font face), ChordPro has supported this for a long time:

Code:
{textcolor red}
[D]When I wake up, yeah, I know I'm gonna be,
I'm gonna [G]be the man who [A]wakes up next to [D]you.
[D]When I go out, yeah, I know I'm gonna be
{textcolor}

I assume MSPro also supports this?
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#5
I don't think I currently support textcolor - it throws a few wrenches in my design. What I'll probably do is, before I process all of the lines normally for the file, I'll go through and take advantage of the pango syntax to transform the file as needed. So 

Code:
{textcolor red}
[D]When I wake up, yeah, I know I'm gonna be,
I'm gonna [G]be the man who [A]wakes up next to [D]you.
[D]When I go out, yeah, I know I'm gonna be
{textcolor}

would internally become

Code:
<span color="red">[D]When I wake up, yeah, I know I'm gonna be,</span>
<span color="red"> I'm gonna [G]be the man who [A]wakes up next to [D]you.</span>
<span color="red"> [D]When I go out, yeah, I know I'm gonna be</span>

handling it this way is more likely to work without introducing large bugs. I can look at the other directives that are similar to textcolor and handle them in a similar way.  Can you think of any reason this would not work?

Thanks,
Mike
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.