# Blurry Text Solution

**URL:** <https://discourse.processing.org/t/blurry-text-solution/11293>\
**Category:** Gallery\
**Created:** [May 16, 2019, 12:59am UTC](https://discourse.processing.org/t/blurry-text-solution/11293 "2019-05-16T00:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [May 16, 2019, 12:59am UTC](https://discourse.processing.org/t/blurry-text-solution/11293/1 "2019-05-16T00:59:50Z")

</div>

I was using different text sizes in a recent project and was getting blurry fonts.  
I solve this issue by setting the largest text size in setup() and problem solved!

Here is the code I used to test this:

```auto
/*
 Project: Blurry Text
 Author: GLV
 Date: 2019-05-15
 Version: 01
*/

void settings() 
  {    
  size(1024, 768, P3D);
  }

void setup() 
  {
  textSize(128); // Set to largest text size used to prevent blurring of text 
  }

void draw()
  {
  background(0);
  text24();
  text36();
  text64();
  text128();
  }
  
void text24()
  {  
  fill(255, 0, 0);
  textSize(24);
  textAlign(CENTER, CENTER);
  text("TEXT SIZE 24", width/2, 1*height/10, 0);
  }
  
void text36()
  {  
  fill(255, 0, 0);
  textSize(36);
  textAlign(CENTER, CENTER);
  text("TEXT SIZE 36", width/2, 3*height/10, 0);
  }
  
void text64()
  {  
  fill(255, 0, 0);
  textSize(64);
  textAlign(CENTER, CENTER);
  text("TEXT SIZE 64", width/2, 5*height/10, 0);
  }  
  
void text128()
  {  
  fill(255, 0, 0);
  textSize(128);
  textAlign(CENTER, CENTER);
  text("TEXT SIZE 128", width/2, 8*height/10, 0);
  }

```

Try changing textSize() in setup() to observe this; set it to a lower value and the text that is larger will be blurred.

🙂

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 18, 2019, 3:02pm UTC](https://discourse.processing.org/t/blurry-text-solution/11293/2 "2019-05-18T15:02:02Z")

</div>

Thank for you sharing this!

For related discussions of scaling and zooming text, also see:

- [https://forum.processing.org/two/discussion/20238/scale-text-to-screen-width](https://forum.processing.org/two/discussion/20238/scale-text-to-screen-width)
- [https://forum.processing.org/two/discussion/20293/high-performance-high-quality-text-rendering-i-ve-just-finished-working-on](https://forum.processing.org/two/discussion/20293/high-performance-high-quality-text-rendering-i-ve-just-finished-working-on)
- [https://forum.processing.org/two/discussion/21206/scaling-text](https://forum.processing.org/two/discussion/21206/scaling-text)

---

<div class="post-metadata">

**Author:** ![Waboqueox](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/waboqueox/32/5643_2.png) [@Waboqueox](https://discourse.processing.org/u/Waboqueox)\
**Post date:** [October 17, 2019, 7:27am UTC](https://discourse.processing.org/t/blurry-text-solution/11293/3 "2019-10-17T07:27:41Z")

</div>

Hi, thanks for the solution 😃 .

It didn’t work for me till I **loaded a font** , and finally it is not blurry anymore:

```auto
public void setup(){
        myFont = createFont("Laksaman Bold", 100, true);
        textFont(myFont);
}

```
