abcjs icon indicating copy to clipboard operation
abcjs copied to clipboard

Abcjs currently wraps not taking text length into account

Open rualark opened this issue 5 years ago • 3 comments

image

%%barnumbers 1
Q:1/4=140
M:4/4
K:C
L:1/16
V: V0 clef=treble name="Sop."
[V: V0]"^!""_VII6""^ok"G8e8-|"^ø""^?""_VI6"e4"^ø"d2"^ø"c2"^!"d4F4|z8"^ok"C4c4|B4e4E4z4|z16|"^ok"E8e8-|e4d2c2d4F4|z8z8|"^ok"E8e8-|e8d8|F8z8|"^ok"E8e8|d8f8|F8z8|"^too far (even with descend)"E4e4d4a4|A4B4G4z4|"^ok"E8e8-|e4d2c2d8|D8E8|z16|"^no (only 2, 3, 5 species)"E16|e16|d16|g16|G16|z16|"^ok"E8e8-|e8d8|f8F8|z16|"^ok"E8e8|c8d8|e8E8|F8z8|"^too far"E8e8-|e8d8|f8e8|E8z8|"^too far"E8e8|d8a8|A8B8|F8z8|z16|

Not sure if this should be fixed. Probably not.

rualark avatar Aug 20 '20 12:08 rualark

Is there a workaround for this? e.g. to wrap the text for abcjs-meta-bottom class?

nbruley avatar Dec 04 '21 16:12 nbruley

Not yet. Are you suggesting to go to two lines in the above case? I was thinking about pushing the string to the left as much as it needs to be, but either way would look better than it currently does but would also have cases where it wouldn't look good.

paulrosen avatar Dec 04 '21 18:12 paulrosen

Yes, I was thinking to wrap to two lines. My use case is a copyright statement at the bottom of the score since copyright administrators specify to put it at the bottom. Wrapping would enable the text to show in its entirety in abcjs-meta-bottom.

My workaround is to put the statement outside of abcjs, but the problem with that is the other bug causes the notation container to be much longer than the notation itself, so the copyright statement is miles below the score.

nbruley avatar Dec 04 '21 18:12 nbruley