# Use emoji in fonts in Processing

**URL:** https://discourse.processing.org/t/use-emoji-in-fonts-in-processing/43685
**Category:** Coding Questions
**Created:** [January 12, 2024, 7:58pm UTC](https://discourse.processing.org/t/use-emoji-in-fonts-in-processing/43685 "2024-01-12T19:58:04Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [January 14, 2024, 11:48pm UTC](https://discourse.processing.org/t/use-emoji-in-fonts-in-processing/43685/10 "2024-01-14T23:48:12Z")

</div>

Hello @Noodlybanan

I am using Windows 10 and Processing 4.3.

Update to my previous [topic](https://discourse.processing.org/t/musical-notation-symbols/43483/9):

```auto
// Display unicode emojis
// glv
// 2024-01-13
// v1.0.0

//Reference:
// https://stackoverflow.com/questions/5585919/creating-unicode-character-from-its-number

PFont myFont;
import java.lang.Character.*;

int fontStart;

void setup() 
  {
  size(1100, 900);
  background(244);

  // Uncomment the following two lines to see the available fonts 
  //String[] fontList = PFont.list();
  //printArray(fontList);
 
  myFont = createFont("Segoe UI Emoji", 36);
  textFont(myFont);
  textAlign(CENTER, BOTTOM);
  fill(0);
  fontStart = 0x1F300;
  println(hex(fontStart));
  }
   
void draw()
  {
  background(244); 
  
  if (frameCount%60 == 0)
    {
    fontStart += 200;
    if (fontStart>0x1FA95) fontStart = 0x1F300;
    println(hex(fontStart));
    }

  for(int i=0; i<200; i++)
    {
    int cp = fontStart+i;  
      
    // Works:  
    //char [] uc = Character.toChars(cp);
    //String s = new String (uc);
    
    // Works:
    //String s = new String(Character.toChars(cp)); // Above in one line
      
    // Works:
    String s = Character.toString(cp);
    
    text(s, i%20*50+70, (i/20)*80+100); // display grid
    }
  }

```

Output:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/9/5939e39f5712b54712e8436894f3b755cf6875d2.png)

References:

- [java - Creating Unicode character from its number - Stack Overflow](https://stackoverflow.com/questions/5585919/creating-unicode-character-from-its-number)
- [Emoji - Wikipedia](https://en.wikipedia.org/wiki/Emoji)
- [GitHub - googlefonts/noto-emoji: Noto Emoji fonts](https://github.com/googlefonts/noto-emoji?tab=readme-ov-file)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/use-emoji-in-fonts-in-processing/43685)._
