anomalous text using plugin API
Using random.qml I added text and noticed a number of things that don't seem correct.
1) missing text with STAFF_TEXT on 3 out of 4 beats.
2) changing font caused #1 to vary.
3) a comparison with REHEARSAL_TEXT also had problems, but not as severe.
4) post-run, manual alignment, selecting Right would put text left of LEFT
5) using a personally designed font fared better, the first beat text was roughly correct, not missing, but the offsetX is incorrect for the first beat of each measure, with or without autoplace.
6) I could create the desired text on the score after running plugin, but alignment was still strange for the manual text.
not sure if I am coding this wrong, or not using the cursor correctly.
png & qml are attached.
Attachment | Size |
---|---|
Screen Shot 2021-02-09 at 3.42.59 AM.png | 80.53 KB |
TEST2.qml | 2.89 KB |
Comments
appears to be a misuse of the cursor. Not sure of actual fundemental problem.
Breaking it up into two passes (notes & text) revolved the problem.
The alignment is correct, but deceptive if only one character of text is used.
The lack of variability on alignment for my font is due my using glyphs with tight kerning.
In reply to appears to be a misuse of… by Matthew Dougherty
final test to manipulate text:
1) create score
2) create STAFF_TEXT & restyle to USER text. Adjust related parameters such as fontSize & family
3) search through score for STAFF_TEXT and CHORD elements