For context, the Magnetic Poetry card is here.
The script of the "Make Magnet" button looks like this:
on click do
s:deck.fonts.body.textsize[word.text]
c:card.add["canvas"]
c.draggable:1
c.size:10+s
c.pos:(card.size-c.size)/2
c.text[word.text 5,5]
end
It's creating a new Canvas widget, sized to suit the text, making it draggable, centering it within the magnetic poetry area, and then drawing the word on that canvas. The font is hardcoded, but it wouldn't be too hard to change it to another hardcoded value, or perhaps to respect the font configured on the field word. Either approach would require one changed line and one added line. Can you work it out? (Solution below the fold!)
on click do
s:word.font.textsize[word.text]
c:card.add["canvas"]
c.draggable:1
c.size:10+s
c.pos:(card.size-c.size)/2
c.font:word.font
c.text[word.text 5,5]
end
The change to the line that computes s is fairly obvious: we need to measure the text using our intended source font. The other detail we need to handle is setting the .font property of our Canvas so that the .text[] method uses it when drawing the word.


