here is a sketch that will extract all the contours from a given text.
https://drive.google.com/file/d/1YG1LbvNxvzDErYjMbdq19vF9V4alC18G/view?usp=sharing
I would have posted on git, but it currently has issues pushing a commit.
all the points are stored in img.cell.contours as cells, a class with an x and y position and a color. Although they are all unsorted.
in setup
void setup(){
//String imPath = dataPath("images")+"\\";
String imAndroidPath = dataPath("images").replace("/data/","")+"/";
String shaderPath = dataPath("shaders").replace("/data/","")+"/";
loc = imAndroidPath+"car.jpg";
//img = new Img(loc);
//class constructor for the text requires; string,width of image,height of image,position x of text, position y of text, height of text
img = new Img("The cat sat on the wall!",1000,100,30,70,20);
button = new Button(width - 100,10,90,20,"Reset");
};
there is another constructor which allows you to change text color and background color but the contour color is always black currently.
There is a lot you can ignore in the code.
But main thing is you now have the points, all the points for the contours.
Also note I have not added font support though it likely isnt too hard.
Github link now available