CRload_font | R Documentation |
Loads font (.ttf) to be used with CRdraw_text
.
font_list <- CRload_font(font_list, fontfile, fontsize, status = NULL)
font_list |
List of fonts previously loaded (possibly empty), to which the loaded font is added. |
fontfile |
File of font (full path + filename + extension) of font to be loaded. |
fontsize |
Size of font to be loaded. |
status |
Optional list |
Returns updated font_list with new font added.If everything worked fine, returned font_list has an integer valid
set to 1
.
fnt_list <- CRload_font(list(), "C:/Documents/myfont.ttf", 20)
CRset_render_color(gs, list(r = 0, g = 0, b = 0))
CRrender_clear(gs)
CRset_render_color(gs, list(r = 100, g = 0, b = 0))
CRdraw_text(gs, fnt_list, 1, "HELLO!", list(x = 100, y = 100))
CRrender_present(gs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.