Description Usage Arguments Value Author(s) Examples
View source: R/glyph_outline.R
This function extracts the outline of character glyphs contained in a font.
1 | glyph_outline(ch = "a", family = "sans", face = "regular")
|
ch |
A character whose glyph is to be extracted. |
family |
The family of the font. See
|
face |
The font face. Possible values are "regular", "bold", "italic" and "bolditalic". |
A data frame with class "glyph_outline". Each row of the data frame contains two numeric values, giving the x and y coordinates of a point, and a character, indicating the action to take on that point in order to draw the outline. The meaning of different characters are given below:
M |
Move the pen to the point |
L |
Draw a straight line to the point |
Q |
Draw a quadratic Bezier curve to the point, followed by a "B" row that gives the coordinates of the control point |
C |
Draw a cubic Bezier curve to the point, followed by two "B" rows that give the coordinates of the control points |
More details can be found in sections 8.3.2 to 8.3.7 of the SVG specification. (http://www.w3.org/TR/SVG/paths.html)
Yixuan Qiu <http://statr.me/>
1 2 | R = glyph_outline("R", family = "sans", face = "bold")
head(R, 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.