Learn R Programming

gWidgets2 (version 1.0-9)

font: Returns font specification for widget, if available

Description

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

Usage

font(obj)

# S3 method for default font(obj)

font(obj) <- value

font(obj) <- value

# S3 method for 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.