How do I change the font size in the V4 plugin?

• Jun 23, 2023 - 10:26

The fontSizeTag used in V3 as shown below (png) does not work in V4.
The fontFaceTag works fine.
Plugins are Shakuhachi, Shinobue, Shamisen, Koto and Jianpu.

Attachment Size
fontSizeTag.png 29.77 KB

Comments

Should work though, here's how it looks in a Mu4 mscx:

<text><font size="22"></font>Title</text>

You're using

<text><font size="22"/>Title</text>

that seems to no longer work?

A full example though (setting font size and font face) looks like this:

        <Text>
          <style>title</style>
          <family>Elephant</family>
          <size>24</size>
          <offset x="0" y="-0.0367454"/>
          <text><font face="Elephant"/>Title</text>
          </Text>
 

In reply to by Jojo-Schmitz

Thank you, I am very interested in this.

I fixed it, but still only the font size does not work.
I am using this method.


var text = newElement(Element.STAFF_TEXT);

text.placement = Placement.BELOW
text.autoplace = false;

text.text = sep + text.text;
text.text=noteNameF[(notes[i].pitch % 12)] +text.text ;

text.offsetX= xPos;
text.offsetY = yPos;
text.color= fontColor;

var fontSizeTag="<font size=\""+fontSize+"\"></font>"; // does't work
var fontFaceTag="<font face=\""+fontNameSel+"\"/>"; // work

text.text= fontSizeTag + fontFaceTag + text.text;
cursor.add(text);

Do you still have an unanswered question? Please log in first to post your question.