[R] customizing edit.data.frame
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Mon May 2 15:30:44 CEST 2022
On Mon, 2 May 2022 11:09:55 +0000
"Viechtbauer, Wolfgang (NP)"
<wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
> I would also love to find out how to make changes to the way edit()
> -- or in my case, View(), but that's presumably using the same
> resources -- looks under Linux.
Looking at the source code [*], there is a way to set the font using an
undocumented option, but the its size is still hard-coded to "12 pt":
https://github.com/r-devel/r-svn/blob/d3e0e30f6da8ab81f24b04690a9a52d81603b189/src/modules/X11/dataentry.c#L1924
(Those are bitmap fonts intended for a fixed DPI which is likely
different from yours, which is why the font size measured in points is
wrong. I'm not an X11 expert, so I don't know whether this is possible,
but I've never seen these fonts packaged for more than 100 DPI.)
It's possible to get the desired result by passing a string with fixed
parameters instead of %s, %s, %d precisely in the right places, but
that's undefined behaviour and not intended to work this way:
stopifnot(l10n_info()$MBCS)
options(X11fonts = "-*-courier-%s-%s-*-*-34-*-*-*-*-*-*-*")
View(1)
(See the xfontsel command for what XLFD font names should look like and
X11Fonts() for what R expects to find in that option.)
--
Best regards,
Ivan
More information about the R-help
mailing list