Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
greubel
Visitor

What's new in 5.3 ?

One thing the font string weight value of 63 to set BOLD no longer works ???
For some reason it has a new value is 75 ???

Why the change ?
0 Kudos
4 REPLIES 4
RokuMarkn
Visitor

Re: What's new in 5.3 ?

Which API are you referring to?

--Mark
0 Kudos
greubel
Visitor

Re: What's new in 5.3 ?

FontRegistry, Get(family as String, size as Integer, bold as Boolean, italic as Boolean) as String
string = family, font-size, pixel-size, style-hint, weight, style, underline, strikeout, fixed-pitch, raw-mode

I'm using the default font for roImageCanvas and by varying the values for the string came up with this:
family null - using default
font-size 1 to 100 - 0 = effectively size 12, size of 30 and 21 returns trash for text, 0's for alpha characters.
pixel-size (-1) - Neg No effect, Pos Same as font size
style-hint (5) - No effect
weight (1) - Value of 63 = bold, after update to 5.3 3019 changed to 75 ????
style (0) - Mod(x,4) = 1,2,3 italics 0=normal
underline Non-zero = underline
strikeout Non-zero = strike through
fixed-pitch No effect
raw-mode No effect
0 Kudos
RokuMarkn
Visitor

Re: What's new in 5.3 ?

I don't know the answer offhand but my first reaction is, why do you care? The string should be treated as opaque. You get it from ifFontRegistry.Get() and you pass it to roImageCanvas. There's no reason you should be parsing the pieces out of it. I provided that information for you earlier for debugging and informative purposes, but your code should not depend on the format or contents of the font description string.

--Mark
0 Kudos
greubel
Visitor

Re: What's new in 5.3 ?

I am try to resize the font for unknown text with an unknown length that has to constrained to a fixed rectangle.
Mainly because Roku only supplies one canned font with four sizes and I don't have the space required to provide an external or packaged font.
Trying to maintain the size so the app will run on all boxes.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.