# Getting a PShape from an emoji...?

**URL:** <https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479>\
**Category:** Libraries\
**Created:** [May 24, 2024, 12:12am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479 "2024-05-24T00:12:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [May 24, 2024, 12:12am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/1 "2024-05-24T00:12:49Z")

</div>

Processing has this `PFont` method, “undocumented” (not in the main public reference), called `.getShape()`, that will give you a `PShape` of a glyph from a font object: [PFont](https://processing.github.io/processing-javadocs/core/processing/core/PFont.html#getShape-char-) docs

But there is a catch… it will only take a char as an argument, and emojis are either `String` or `char[]` arrays… so I guess I’m out of luck, I suppose.

Any alternative suggestions?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [May 24, 2024, 12:51am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/2 "2024-05-24T00:51:14Z")

</div>

Method Font::[**createGlyphVector()**](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Font.html#createGlyphVector(java.awt.font.FontRenderContext,java.lang.String)) which method PFont::**getShape()** internally invokes is overloaded to accept other datatypes besides just `char[]`, such as `int[]` and String:

> <https://github.com/benfry/processing4/blob/processing-1293-4.3/core/src/processing/core/PFont.java#L748-L751>

So you can try out your luck and ask the devs to add more datatype options for **getShape()**'s calling signature:

> **[Issues · benfry/processing4](https://github.com/benfry/processing4/issues)**
>
> Processing 4.x releases for Java 17. Contribute to benfry/processing4 development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [May 24, 2024, 1:05am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/3 "2024-05-24T01:05:03Z")

</div>

Thank you @GoToLoop! As usual, you are the best! I’ll study my options now 😃

---

<div class="post-metadata">

**Author:** ![stema253](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@stema253](https://discourse.processing.org/u/stema253)\
**Post date:** [June 29, 2024, 9:06am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/4 "2024-06-29T09:06:08Z")

</div>

I’m interested in this topic, but I don’t know anything about Java. Can I have an example please (if possible)? Let’s say the letter “1”.

---

<div class="post-metadata">

**Author:** ![stema253](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@stema253](https://discourse.processing.org/u/stema253)\
**Post date:** [June 29, 2024, 9:11am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/5 "2024-06-29T09:11:50Z")

</div>

And I mean in Prosessing, not in P5 or somthing else!! Thanks a lot.

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [June 29, 2024, 1:29pm UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/6 "2024-06-29T13:29:47Z")

</div>

Hi @stema253 ,

Have you tried the geomerative library.

> **[GitHub - rikrd/geomerative: Geomerative is a library for Processing. It...](https://github.com/rikrd/geomerative)**
>
> Geomerative is a library for Processing. It extends 2D geometry operations to facilitate generative geometry. Includes a TrueType font and an SVG interpreters. This library exposes the shapes (such...

> <https://github.com/rikrd/geomerative/blob/5e2d1ebcaffc3a5537de3825e4fab87cc17c01ea/examples/Tutorial_07_HelloWorld_getPoints/Tutorial_07_HelloWorld_getPoints.pde>

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [June 29, 2024, 6:30pm UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/7 "2024-06-29T18:30:23Z")

</div>

`I’m interested in this topic, but I don’t know anything about Java. Can I have an example please (if possible)? Let’s say the letter “1”.`

The following source code should get the glyphVector coordinates for ‘1’:

```auto
/*
  This demo uses java code to display the character '1' as
  well as the font outline and vectors (x,y coordinates) used
  to create it. The outline was initially created offscreen,
  so a translation was required to pull it down so that we can
  see it. A similar technique was used to reposition the vector
  points (marked by small circles) using an AffineTransform. The
  points were found using a PathIterator and temporarily held
  in an array.
*/

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.geom.AffineTransform;
import java.awt.geom.PathIterator;

double[] coords = new double[2];
int index = 0;

int _wndW = 300;
int _wndH = 500;

class CanvasForDisplay extends Canvas {
  public void paint(Graphics g) {
    Graphics2D g2D = (Graphics2D) g;
    Font font = new Font("Verdana", Font.BOLD, 106);
    FontRenderContext fontRenderContext = g2D.getFontRenderContext();
    GlyphVector glVector = font.createGlyphVector(fontRenderContext, "1");
    g2D.drawGlyphVector(glVector, 120, 360);
    Shape s = glVector.getOutline();
    g2D.translate(120,150); // Initially drawn above our window so move it down
    g2D.draw(s);
    println("Shape =",s);
    println(s.getBounds());
    AffineTransform translate = new AffineTransform();
    translate.setToTranslation(0, 100);
    PathIterator path = s.getPathIterator(translate, 0.5);
    println("pathIterator =",path);
    println("windingRule =",path.getWindingRule());
    while (!path.isDone()) {
      path.currentSegment(coords);
      println("pt[" + index + "] = " + (int)coords[0] + " : " + (int)coords[1]);
      g2D.drawOval((int)coords[0], (int)coords[1], 4, 4);
      path.next();
      index++;
    }
  }
}

void setup() {
  surface.setVisible(false); // Don't show default Processing window.
  Frame frame = new Frame("FontRenderContextExample");
  frame.setBounds(100, 100, _wndW, _wndH);
  frame.add(new CanvasForDisplay());
  frame.setVisible(true);
  frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
      System.exit(0);
    }
  }
  );
}

```

**Output:**

 ![frc](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/2/327778fdbdebc0fa7352250d521fe464b2e1ab19.png)

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [June 29, 2024, 8:21pm UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/8 "2024-06-29T20:21:09Z")

</div>

Cheers @stema253, @mnse and @svan !

I have played with Geomerative before, it could be a solution as it is getting a string and not a char, but I wonder how it goes about it internally!

Processing “as is” can get the contours of the “simple” glyphs, like ‘1’ fine, the problem arises if they are represented by multiple chars in Java (like emojis).

I’ll have a look at these!

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [June 29, 2024, 11:16pm UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/9 "2024-06-29T23:16:12Z")

</div>

Is the emoji that you’re trying to get the shape of contained in a _font_ collection? If so, what is the font’s name and the character’s number?

**Addendum:**

Font setting:

```auto
Font font = new Font("Webdings", Font.BOLD, 106);

```

When I enter this line of code:

```auto
GlyphVector glVector = font.createGlyphVector(fontRenderContext, new String("0x1F577"));

```

I get this **output:**

 ![fnts](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/5/a5b207567c76a4506177c94a253022ff52332f20.png)

Which is not what I see when use **println()**:

```auto
println(new String(Character.toChars(0x1F577)));

```

**Addendum2:**

Ok, I see how this works. When you use newString(“012345”); it will get the coordinates for each character in succession. If you look at the screen shot of Webdings older version you can see where these characters came from. It starts at zero on the first bar character on line 2 (not sure what the numbers are for the first line).

 ![wbdngs](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/a/1a8b84ff14e9d9ce50513fec0e84b060fee7da95.png)

**Addendum3:**

Here’s the output for:

```auto
GlyphVector glVector = font.createGlyphVector(fontRenderContext, new String("012345"));

```

Which matches up perfectly:

 ![012345](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/1/11643165bad895b7286c00ed86b4044a7ddddcba.png)

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [June 30, 2024, 12:46am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/10 "2024-06-30T00:46:44Z")

</div>

Ok, you are getting the points! It looks very promising! But webdings map to single chars…

My question was generic, because a student of mine was asking about using emojis, I think we could try [OpenSansEmoji/OpenSansEmoji.ttf at master · MorbZ/OpenSansEmoji · GitHub](https://github.com/MorbZ/OpenSansEmoji/blob/master/OpenSansEmoji.ttf)

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [June 30, 2024, 1:10am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/11 "2024-06-30T01:10:32Z")

</div>

I need a character number. Here’s the output new String(“012345”) for OpenSansEmoji.ttf but I don’t think that’s what you had in mind:

 ![ose](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/0/9/0905b477aea0479c5d3dc1102efb93d047405590.png)

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [June 30, 2024, 1:35am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/12 "2024-06-30T01:35:41Z")

</div>

Maybe 🌐 U+1F310 Globe with meridians?

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [June 30, 2024, 1:48am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/13 "2024-06-30T01:48:18Z")

</div>

Using this code here’s the output for U+1F310 which is equal to 127760:

```auto
  GlyphVector glVector = font.createGlyphVector(fontRenderContext,String.format("%c", 127760));

```

 ![Screenshot 2024-06-30 at 2.49.40 AM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/d/9d4bfd86a4dc491e4f364ddfa05341b63c423fac.png)

**Addendum:**  
Another way of getting emoji string for Webdings is like this:

```auto
GlyphVector glVector = font.createGlyphVector(fontRenderContext,"!");

or alternatively

GlyphVector glVector = font.createGlyphVector(fontRenderContext,String.format("\uf05e"));

```

 ![spdr](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/d/7d43f2d23f01c653585e3364cef1a55810ef478c.png)

You can see how to get all the webdings characters here:  
[https://speakingpowerpoint.wordpress.com/wp-content/uploads/2011/10/symbol-fonts-full-page3.jpg](https://speakingpowerpoint.wordpress.com/wp-content/uploads/2011/10/symbol-fonts-full-page3.jpg)

Basically every keyboard character is mapped to a webding.

**N.B.**  
**This technique also works for Wingdings, Wingdings 2, and Wingdings 3 as well as other fonts, such as OpenSansEmoji.ttf**

This gives access to the characters further down than what is shown above:

```auto
GlyphVector glVector = font.createGlyphVector(fontRenderContext,String.format("%c", 255));

```

 ![dove](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/1/81f7e6737ec9e6b42442310cbf1110432804b40e.png)

**Summary:**  
The range is 33 - 255 with this technique and should get the coordinates for all the characters using the following format:

```auto
GlyphVector glVector = font.createGlyphVector(fontRenderContext,String.format("%c", numberInRange));

```

Values for all the characters are listed here:  
[https://www.alanwood.net/demos/webdings.html](https://www.alanwood.net/demos/webdings.html)

---

<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:** [June 30, 2024, 10:54am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/14 "2024-06-30T10:54:34Z")

</div>

> [@villares](#):
>
> Maybe 🌐 U+1F310 Globe with meridians?

“Segoe UI Emoji” font available to me on W10:

```auto
int count = 0x1F310;
Font font = new Font("Segoe UI Emoji", Font.BOLD, 120);
GlyphVector glVector = font.createGlyphVector(fontRenderContext, Character.toString(count));

```

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

Example using the “Segoe UI Emoji” here:  
_[Use emoji in fonts in Processing - #10 by glv](https://discourse.processing.org/t/use-emoji-in-fonts-in-processing/43685/10)_

`:)`

---

<div class="post-metadata">

**Author:** ![behreajj](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@behreajj](https://discourse.processing.org/u/behreajj)\
**Post date:** [June 30, 2024, 9:17pm UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/15 "2024-06-30T21:17:19Z")

</div>

A while back I worked on a wrapper to handle some font glyph stuff in the [CamZup library](https://github.com/behreajj/CamZup/blob/master/src/camzup/pfriendly/TextShape.java), since Processing’s methods made `PShape`s with errors. iirc, there was an issue with the AWT path iterator repeating the same point at the open and close of a shape, and Processing not handling this case.

 ![screenCap0](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/b/8b0f050280b3db87f9c0ebcfa5d8dbd7e01db2f7.png)

 ![screenCap1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/7/879b73b12e99773577b589808b8b374862bb2a0f.png)

Supplying 0 detail to the AWT path iterator allows you to get the Bezier control points to the curve, rather than samples. Having the choice may allow you–or your students–to decide where there’s an advantage to each.

 ![screenCap2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/9/f93e7e58e48b236a8390f6b33e6fd57bc4b6b001.png)

Above the sample detail is relatively big, leading to a blockier result.

```java
import camzup.pfriendly.*;
import camzup.core.*;

YupJ2 graphics;
CurveEntity2[] glyCrv;

boolean showHandles = true;

MaterialSolid matCrv = new MaterialSolid()
  .setFill(true)
  .setFill(0xff4f4f4f)
  .setStroke(true)
  .setStroke(0xfffff7d5)
  .setStrokeWeight(2.0);

PFont font;

void settings() {
  size(1067, 600, YupJ2.PATH_STR);
}

void setup() {
  graphics = (YupJ2)getGraphics();
  PImage txtr = createImage(512, 512, ARGB);
  ZImage.rgb(txtr);

  textMode(SHAPE);
  String str = Character.toString(0x1f310);
  font = createFont("Segoe UI Emoji", 72.0);
  // The flag to separate glyphs must be false for this to work,
  // as separation depends on chars.
  glyCrv = TextShape.glyphCurve(font, 1.0, 0.0, false, str);
  
  // font = createFont("Webdings", 72.0f);
  // glyCrv = TextShape.glyphCurve(font, 1.0, 0.0, new int[] { 4, 5, 8 } );
  
  int lenGlyphs = glyCrv.length;
  float scalar = 1.5 * Utils.min(graphics.width, graphics.height);
  for(int i = 0; i < lenGlyphs; ++i) {
    CurveEntity2 glyph = glyCrv[i];
    glyph.reframe();
    glyph.scaleTo(scalar);
  }
}

void draw() {
  graphics.background(0xff202020);
  
  int lenGlyphs = glyCrv.length;
  for(int i = 0; i < lenGlyphs; ++i) {
    CurveEntity2 glyph = glyCrv[i];
    graphics.shape(glyph, matCrv);
    if (showHandles) {
      graphics.handles(glyph);
    }
  }
}

void mouseWheel(MouseEvent e) {
  float mWheel = e.getCount();
  graphics.zoomBy(-mWheel * 0.05);
}

void keyReleased() {
  if (key == ' ') {
    showHandles = !showHandles;
  } else if (key == 's') {
    String result = graphics.toSvgString(glyCrv, matCrv);
    saveStrings("data/text.svg", new String[] { result });
    println("Saved to svg.");
  }
}

```

There’s also an option for SVG output:

 ![svgCap](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/6/96fbb4146ed1401a3f35e7620013b32ce3934d74.png)

The tough part is preserving the cut-out shapes. The example code above uses an AWT-based renderer. If the P2D-like renderer is used, all the holes are opaque. Same deal with converting from the curve objects that I use to `PShape`s.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [July 2, 2024, 3:20am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/17 "2024-07-02T03:20:53Z")

</div>

Hi, @behreajj and @svan,

I can attest the method works fine, you have to do some checking for when a vertex repeats (then you know an external polygon has closed). **So you have to check yourself when a vertex is the same as the initial vertex and this indicates a closed polygon**. If you are drawing directly from the vertices, you can just repeat the vertex without using `endShape(CLOSE)`, use `endShape()` only.

Then the problem is to know when to switch to `beginCountour()` / `endContour()` for the holes, or when it is a separate filled part of the glyph… One might perhaps use the PShape `.contains()` method for that decision, but I was not drawing directly so I used shapely to decide and apply the holes.

On py5 I’m doing this (and then using other strategies, with the shapely library) to make polygons with holes:

```python
        ...
        glyph_pt_lists = [[]]
        c_shp = font.get_shape(c, 1)
        vs3 = [c_shp.get_vertex(i) for i in range(c_shp.get_vertex_count())]
        vs = set()
        for vx, vy, _ in vs3: # discarding vz
            x = vx + x_offset
            y = vy + y_offset
            glyph_pt_lists[-1].append((x, y))
            if (x, y) not in vs:
                vs.add((x, y))
            else:
                glyph_pt_lists.append([]) # will leave a trailing empty list

```

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [July 3, 2024, 1:05am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/19 "2024-07-03T01:05:42Z")

</div>

The following technique with Java’s Shape gives clean output and there is no need to get all the vectors of an emoji and reconstruct it into a PShape.

```auto
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.Font;
import java.awt.Shape;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.geom.AffineTransform;

final int _wndW = 550;
final int _wndH = 400;

class CanvasDisplay extends Canvas {
  void paint(Graphics g) {
    Graphics2D g2D = (Graphics2D)g;
    Font font = new Font("Webdings", Font.BOLD, 106);
    FontRenderContext fontRenderContext = g2D.getFontRenderContext();
   // int value = 0x1F310;
    int value = 45;
    GlyphVector glVector = font.createGlyphVector(fontRenderContext, Character.toString(value));
    g2D.drawGlyphVector(glVector, 140, 280); // Black fill by default
    Shape s = glVector.getOutline();
    g2D.translate(140,140); 
    Color myRed = new Color(0.9, 0.1, 0.1);
    g2D.setColor(myRed);
    g2D.fill(s);
    g2D.draw(s);
    g2D.translate(140,140);
    g2D.setColor(Color.BLUE);
    g2D.fill(s);
    g2D.draw(s);
  }
}

void setup() {
  surface.setVisible(false);
  JFrame frame = new JFrame("GlyphVector Outline Example");
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  frame.setBounds(100, 100, _wndW, _wndH);
  frame.setResizable(false);
  CanvasDisplay display = new CanvasDisplay();
  frame.add(display);
  frame.setVisible(true);
}

```

 ![shpe](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/9/e956235a1aa76d0beaa0863f0aeca174588f6c25.png)

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [July 3, 2024, 1:46am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/20 "2024-07-03T01:46:41Z")

</div>

this is very cool, but my student needed the geometry for using it with [pymunk](https://www.pymunk.org) in a 2D physics simulation…

---

<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:** [July 3, 2024, 10:39am UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/21 "2024-07-03T10:39:16Z")

</div>

Hello @svan,

> [@svan](#):
>
> The following source code should get the glyphVector coordinates for ‘1’:

Can you please add some comments to this code?

It would certainly benefit users seeing this for the first time and may encourage them to explore further.

This may all look unfamiliar to users new to Processing.

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [July 3, 2024, 2:41pm UTC](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479/22 "2024-07-03T14:41:46Z")

</div>

Done. Thanks for the suggestion.

[Next page](https://discourse.processing.org/t/getting-a-pshape-from-an-emoji/44479.md?page=2)
