font: Returns font specification for widget, if available

Description Usage Arguments

View source: R/methods.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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 documentation built on Jan. 11, 2022, 1:07 a.m.