Bind font on components

Why does the font property on components not have the ability to be binded? I was thinking I could store the font in the database and if we ever wanted to change the font throughout the project we would only need to change the font in the database table. is there a better way have setting the font on components from an outside source?

Thank you,

Because of the complexity involved in converting from other types to fonts. “Font” isn’t a type that you can make a tag or property out of, so what would you be binding it to: a string?

What I did for the border property was create a global script that takes some parameters and queries the database for the property string for the border. I then use the runScript expression to call the global script and I wrap the results with the toBorder function.

Could I do the same with the font but use the toFont expression?

Unfortunately since the font property isn’t doesn’t have a binding option this solution won’t work for you. We can look into seeing if we can make the font property accept bindings so that this method would work.

1 Like