Closed landroni closed 10 years ago
I don't have a get_font
method implemented. I'd suggest wrapping your font code in something like this:
setFont = function(obj, spec) {
font(obj) <- spec
tag(obj, "font") <- spec
}
getFont = function(obj) tag(obj, "font")
You could make it fancier if you wished.
Thanks for the tip. I ended up implementing something similar.
But I was wondering if a get_font
method would still be warranted in this case?
The problem is that implementing it is not so easy, as far as I know. I don't think the underlying toolkits make it so simple. I'd be happy to be proven wrong.
Consider the following:
Now from
?font
I would expect that:would return the font information (e.g.
list(weight = "bold")
), but instead all it returns isNULL
. Is this a bug?