function make_html_map($map)
{
    $out = array();
    foreach ($map as $row) {
        $hex = '';
        foreach ($row['unicode'] as $cp) {
            $hex .= sprintf('%x', $cp);
        }
        $bytes = unicode_bytes($row['unicode']);
        $out[$bytes] = "<span class=\"emoji emoji{$hex}\"></span>";
    }
    return $out;
}
Esempio n. 2
0
function make_mapping($mapping, $dest)
{
    $result = array();
    foreach ($mapping as $map) {
        $src_char = unicode_bytes($map['unified']);
        if (!empty($map[$dest])) {
            $dest_char = unicode_bytes($map[$dest]);
        } else {
            $dest_char = '';
        }
        $result[$src_char] = $dest_char;
    }
    return $result;
}
Esempio n. 3
0
		<th>Sheet</th>
	</tr>
	<tbody>

<?php 
foreach ($catalog as $row) {
    $url_apple = $row['has_img_apple'] ? "img-apple-64/{$row['image']}" : '';
    $url_google = $row['has_img_google'] ? "img-google-64/{$row['image']}" : '';
    $url_twitter = $row['has_img_twitter'] ? "img-twitter-64/{$row['image']}" : '';
    $url_emojione = $row['has_img_emojione'] ? "img-emojione-64/{$row['image']}" : '';
    echo "\t<tr>\n";
    echo "\t\t<td><img src=\"{$url_apple}\" width=\"20\" height=\"20\" /></td>\n";
    echo "\t\t<td><img src=\"{$url_google}\" width=\"20\" height=\"20\" /></td>\n";
    echo "\t\t<td><img src=\"{$url_twitter}\" width=\"20\" height=\"20\" /></td>\n";
    echo "\t\t<td><img src=\"{$url_emojione}\" width=\"20\" height=\"20\" /></td>\n";
    echo "\t\t<td>" . unicode_bytes($row['unified']) . "</td>\n";
    echo "\t\t<td>" . HtmlSpecialChars(StrToLower($row['name'])) . "</td>\n";
    echo "\t\t<td>:{$row['short_name']}:</td>\n";
    echo "\t\t<td>{$row['text']}</td>\n";
    echo "\t\t<td>" . format_codepoints($row['unified']) . "</td>\n";
    echo "\t\t<td>" . format_codepoints($row['docomo']) . "</td>\n";
    echo "\t\t<td>" . format_codepoints($row['au']) . "</td>\n";
    echo "\t\t<td>" . format_codepoints($row['softbank']) . "</td>\n";
    echo "\t\t<td>" . format_codepoints($row['google']) . "</td>\n";
    echo "\t\t<td>{$row['image']}</td>\n";
    echo "\t\t<td>{$row['sheet_x']},{$row['sheet_y']}</td>\n";
    echo "\t</tr>\n";
}
?>
	</tbody>
</table>
Esempio n. 4
0
function make_mapping($mapping, $dest)
{
    $result = array();
    foreach ($mapping as $map) {
        $src_char = unicode_bytes($map['unicode']);
        if (!empty($map[$dest]['unicode']) && is_array($map[$dest]['unicode']) && count($map[$dest]['unicode'])) {
            $dest_char = unicode_bytes($map[$dest]['unicode']);
        } else {
            $dest_char = $map[$dest]['kaomoji'];
        }
        $result[$src_char] = $dest_char;
    }
    return $result;
}