Displaying 1 result from an estimated 1 matches for "differentfont".
2010 Mar 27
1
string width calculation
...nt in which I use margin text with two different fonts. The resulting text might be:
XXXXXyZZZ
where X and Z are one font and Y is the other.
My plan was to do this in the following manner:
mtext("XXXXX ZZZ", cex=2, adj=0.5, family=SOMEFONT)
mtext("Y", cex=2, adj=??, family=DIFFERENTFONT)
My question regards how to calculate "adj" for the second string.
I tried the following (different strings here and the same font was used for both strings - even under these circumstances, it does not work correctly):
> STRING1 <- "0123456789 0"
> STRING2 <- &quo...