MobileSheets Forums

Full Version: Chordpro chord on the next line
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The marked chords are erroneously wrapped to the next line. Chords should be above the letter in the lyrics that follows. In case that doesn't fit on one line chords AND lyrics have to be wrapped, see expected.png
A workaround is easy: reducing Lyric Size and Chord Size
The use of [(][D][)] caused some interesting problems in the logic when it comes to figuring out positioning and wrapping of chords and lyrics. Any time chords are placed directly next to each other such as 

[C][D][E]My lyrics

it causes my logic to have to make room for all three chords next to each other, and then offset the lyrics appropriately. For example, if you had

[C]Some lyrics,[E][F] More lyrics

The E and F would be on top of each other, because they both want to be positioned right after the comma. To ensure that things still line up correctly, my logic will either offset the lyrics after that point with spaces, or if it happens in the middle of a word, a dash will be used to split up the word. So back to your example, the second line is offset at the start with a number of spaces to account for the chords that all want to be positioned at the start, so it pushes the lyrics slightly to the right. Unfortunately, my logic didn't account for recalculating a wrap after that offset occurs, but it does account for that when calculating chord wrapping. So as you noticed, the D got wrapped at the end, but the lyrics at the end did not get wrapped like they should. Well I've updated the logic, so now the second line will wrap both the D and "felicidad" to the next line. I'm hoping I've accounted for every possible situation, but this scenario only occurs when chords overlap, so it doesn't happen all that often.

Thanks for the bug report and file.

Thanks Mike for investigating that.

As soon as the next update is available I will check also
ChordPro rendering swallows text
ChordPro formatting: missing line