mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-27 00:10:43 +00:00
22 lines
376 B
Plaintext
22 lines
376 B
Plaintext
sub init()
|
|
m.top.functionName = "getTextSize"
|
|
end sub
|
|
|
|
sub getTextSize()
|
|
|
|
reg = CreateObject("roFontRegistry")
|
|
font = reg.GetDefaultFont(m.top.fontsize, false, false)
|
|
|
|
res = []
|
|
|
|
for each line in m.top.text
|
|
res.push(font.GetOneLineWidth(line, m.top.maxWidth))
|
|
end for
|
|
|
|
m.top.height = font.GetOneLineHeight()
|
|
|
|
|
|
m.top.width = res
|
|
|
|
end sub
|