britzl / defold-richtext

Defold-RichText is a system to create styled text based on an HTML inspired markup language
MIT License
75 stars 12 forks source link

Font in custom tag #89

Closed abadonna closed 11 months ago

abadonna commented 11 months ago

If font was registered in a custom tag (via tags.register) it stays in word.font

britzl commented 11 months ago

I'm not 100% sure I understand when this is an issue. Could you please try to explain it a bit more or provide an example? I'd like to understand the issue the PR solves before merging it.

abadonna commented 11 months ago

E.g. you want to create a custom tag with a different font:

tags.register("shortcut", function(params, settings)
        tags.apply("color", LINK_COLOR, settings)
        tags.apply("font", "shortcut", settings)
    end)

this font is ignored now, so i think it's a bit frustrating