Hi there, I am having issues loading fonts that I have installed on my Windows fonts folder .
The message that I get every time is "
“PPEiko-Medium” is not available, so another font will be used. Use PFont.list() to show available fonts."
I get this message for all the fonts that I install … can somene helps please
Did you create a font from the tools menu? if not that’ll be the issue
Hi
Here is some hints
Hi there, yes I did and also followed all the previous posts about this issue but i still cant find a way to load the fonts
Hi there,I have addeted the font in the sketch with the font tool but it still gives me the same error
Hi
This is how I added font
1 Download the font file without processing IDE
2 drag or add the file to sketch folder
Here is the 7 segment font file download it
Then in processing side
PFont Segment ;
void setup() {
size(640,320);
Segment = createFont("Segment7", 150); // Assign fonts and size
}
Hello @bardo ,
Be sure to use the name of the font in the PFont list:
Reference:
https://processing.org/reference/createFont_.html
:)
Hi there, the problem is that a lot of the fons that are installed correclty in windows and work correclty in all my programs, they wont show in the font list. Acually I can also see a very limited number of fonts in the font list. Also there are some fonts that are included in the font list but still give the error (please see screenshot)
hi
PFont Segment;
void setup() {
size(600, 180);
Segment = createFont("Segment7Standard.otf", 120);
textFont(Segment);
//textAlign(RIGHT);
fill(250,250,0);
}
void draw()
{
background(0, 0, 0);
textFont(Segment);
text("123 JAFAL", 0, 120);
}
Font from here
Hey it’s loading the fonts now but how can i make this work within this piece of code that i was tryng to make it work? Please se below:
float mutationRate = 0.01;
int totalPopulation = 250;
DNA population;
ArrayList matingPool;
String target;
PFont f;
void setup() {
size(800,800);
target = “KEEP SMILING”;
population = new DNA[totalPopulation];
for (int i = 0; i < population.length; i++) {
population[i] = new DNA(target.length());
}
f = createFont(“Courier”,12,true);
}
void draw() {
for (int i = 0; i < population.length; i++) {
population[i].calcFitness(target);
}
ArrayList matingPool = new ArrayList();
for (int i = 0; i < population.length; i++) {
int nnnn = int(population[i].fitness * 100);
for (int j = 0; j <nnnn; j++) {
matingPool.add(population[i]);
}
}
for (int i = 0; i < population.length; i++) {
int a = int(random(matingPool.size()));
int b = int(random(matingPool.size()));
DNA partnerA = matingPool.get(a);
DNA partnerB = matingPool.get(b);
DNA child = partnerA.crossover(partnerB);
child.mutate(mutationRate);
population[i] = child;
}
background(249,248,230);
fill(255,139,139);
String everything = “”;
for (int i = 0; i < population.length; i++) {
everything += population[i].getPhrase() + " ";
}
textFont(f,12);
text(everything,10,10,width,height);
}
HEY! I Made it work!! Thank you