# TrueType loadFont

**URL:** <https://discourse.processing.org/t/truetype-loadfont/5127>\
**Category:** Beginners\
**Created:** [November 2, 2018, 4:08pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127 "2018-11-02T16:08:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FerrariLuigi](https://avatars.discourse-cdn.com/v4/letter/f/5f8ce5/32.png) [@FerrariLuigi](https://discourse.processing.org/u/FerrariLuigi)\
**Post date:** [November 2, 2018, 4:08pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127/1 "2018-11-02T16:08:13Z")

</div>

Dear all,

according the example ( [https://processing.org/reference/textFont\_.html](https://processing.org/reference/textFont_.html) ) on the reference manual I wrote the following sketch:

```auto
PFont font32;
void setup()
{
    font32 = loadFont("steelfish rg.ttf");
    size(300,300);
    background(255);
}

void draw()
{
  fill(255,0,0);
  textFont(font32);
  text("word", 12, 60);
}

```

Unfortunately it doesn’t work because loadFont accepts only VLW file.  
I converted the font in VLW format but, as soon as I try to display some text, the the image trasparency is compromised.

Did you have any similar problem ?  
How do you fixed it ?  
Thank you very much for your help and cooperation  
Regards

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 2, 2018, 8:04pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127/2 "2018-11-02T20:04:30Z")

</div>

Did you adjust your code to „.vlw“? It might not be loading correctly if you still have .ttf as ending. Or if Thats not it, maybe the conversino didn‘t go Well and the font itself got transparent.

---

<div class="post-metadata">

**Author:** ![FerrariLuigi](https://avatars.discourse-cdn.com/v4/letter/f/5f8ce5/32.png) [@FerrariLuigi](https://discourse.processing.org/u/FerrariLuigi)\
**Post date:** [November 2, 2018, 9:08pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127/3 "2018-11-02T21:08:31Z")

</div>

Yes, of course.  
I adjusted the code as following:

```auto
PFont font32;
PImage myImg;
void setup()
{
    font32 = loadFont("steelfish rg.vlw");
    size(300,300);
    background(255);
    myImg=loadImage("myImage.png");

}

void draw()
{
  image(myImg,100,100);
  fill(255,0,0);
  textFont(font32);
  text("word", 12, 60);
}

```

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 2, 2018, 9:25pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127/4 "2018-11-02T21:25:40Z")

</div>

That shouldn‘t be possible, since files arent allowed to have spaces, at least as far as i know. And if that doesn‘t work, try Setting the font after size().
