glyph_bitmap: Extracting bitmap glyph from fonts loaded by the 'sysfonts'...

Description Usage Arguments Value Author(s) Examples

View source: R/glyph_bitmap.R

Description

This function returns a bitmap matrix that represents the glyph of a given string with the specified font.

Usage

1
2
glyph_bitmap(ch = "A", family = "mono", face = "regular",
  pixel_size = 50, rot = 0)

Arguments

ch

A character string whose glyph is to be extracted.

family

The family of the font. See font.families().

face

The font face. Possible values are "regular", "bold", "italic" and "bolditalic".

pixel_size

The pixel size of the font.

rot

The angle in degrees of the counterclockwise string rotation.

Value

A matrix with class "glyph_bitmap" that represents the bitmap glyph. Values in the matrix are integers ranging from 0 to 255. Larger number indicates a darker color.

Author(s)

Yixuan Qiu <http://statr.me/>

Examples

1
2
f = glyph_bitmap("fontr", family = "serif", face = "italic")
plot(f)

yixuan/fontr documentation built on May 4, 2019, 5:29 p.m.