Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

font

Returns font specification for widget, if available


Description

Returns font specification for widget, if available

Basic S3 method for font

Set font for a widget

Basic S3 method for setting font

The font assignment method is used to change the font of the currently selected text.

Usage

font(obj)

## Default S3 method:
font(obj)

font(obj) <- value

font(obj) <- value

## S3 replacement method for class 'GText'
 font(obj) <- value

Arguments

obj

object

value

The font specification is given in terms of a named vector or list where the names indicate a font attribute and the value a reasonable choice:

weight

c("light", "normal", "medium", "bold", "heavy")

style

c("normal", "oblique", "italic")

family

c("sans", "helvetica", "times", "monospace")

size

an integer, say c(6,8,10,11,12,14,16,18,20, 24,36,72)

color (or foreground)

One of colors()

background

One of colors()

scale

c("xx-large", "x-large", "large" , "medium", "small", "x-small", "xx-small")

These are from Gtk's font specs, which though fairly standard, may not be totally supported in the other toolkits.


gWidgets2

Rewrite of gWidgets API for Simplified GUI Construction

v1.0-8
GPL (>= 3)
Authors
John Verzani
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.