EVOLUTION-MANAGER
Edit File: str_split_emoji.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Split a string into emoji and non-emoji glyph runs</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for str_split_emoji {systemfonts}"><tr><td>str_split_emoji {systemfonts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Split a string into emoji and non-emoji glyph runs</h2> <h3>Description</h3> <p>In order to do correct text rendering, the font needed must be figured out. A common case is rendering of emojis within a string where the system emoji font is used rather than the requested font. This function will inspect the provided strings and split them up in runs that must be rendered with the emoji font, and the rest. Arguments are recycled to the length of the <code>string</code> vector. </p> <h3>Usage</h3> <pre> str_split_emoji( string, family = "", italic = FALSE, bold = FALSE, path = NULL, index = 0 ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>string</code></td> <td> <p>A character vector of strings that should be splitted.</p> </td></tr> <tr valign="top"><td><code>family</code></td> <td> <p>The name of the font family</p> </td></tr> <tr valign="top"><td><code>italic</code></td> <td> <p>logicals indicating the font style</p> </td></tr> <tr valign="top"><td><code>bold</code></td> <td> <p>logicals indicating the font style</p> </td></tr> <tr valign="top"><td><code>path, index</code></td> <td> <p>path an index of a font file to circumvent lookup based on family and style</p> </td></tr> </table> <h3>Value</h3> <p>A data.frame containing the following columns: </p> <dl> <dt>string</dt><dd><p>The substring containing a consecutive run of glyphs</p> </dd> <dt>id</dt><dd><p>The index into the original <code>string</code> vector that the substring is part of</p> </dd> <dt>emoji</dt><dd><p>A logical vector giving if the substring is a run of emojis or not</p> </dd> </dl> <h3>Examples</h3> <pre> emoji_string <- "This is a joke\U0001f642. It should be obvious from the smiley" str_split_emoji(emoji_string) </pre> <hr /><div style="text-align: center;">[Package <em>systemfonts</em> version 1.0.4 <a href="00Index.html">Index</a>]</div> </body></html>