Question: To manage emails I am using the php library PHPMailer. On the client side, I validate the email address using the `email` method of jquery validator plugin. 

```
$("#regForm").validate({
   rules:{
              email:
                        {
                            required: true,
                            email: true            
                        }
          }

```

Now, the problem is that the set of allowed characters of validator `email` method and the set of allowed characters on PHPMailer is not the same.
For example, `email` method allows the '$' character but when email address contains the '$' character the `send()` method of Phpmailer returns false (failed sending email) and the error:
'The following recipients failed: example$@mail.it : Invalid Email address'.

I could fix the problem making a new custom method, using a done on purpose regex, to validate email addresses on client side. But what are the allowed characters for email addresses on PHPMailer send method, and where can i find them?

Answer: 
You just have to store the font in a global variable :

```
var myFont, fontReady = false;

function fontRead(){
    fontReady = true; }

function preload() {
    myFont = loadFont("./fonts/MyfontFile.ttf", fontRead); } //replace with correct path

function setup() {
    createCanvas(720, 400);
    doyourSetup(); }

function draw() {
    background(255);
    if (fontReady) {
        textFont(myFont);
        text("Hello World!", 10, 30);
    }
 }

```

Sorry for the incorrect formatting im on mobile
Your question is answered in [the P5.js reference](https://p5js.org/reference/#/p5/loadFont):

> 
> You can also use the string name of the font to style other HTML
>  elements.
> 
> 
> 
> ```
> var myFont;
> 
> function preload() {
>   myFont = loadFont('assets/Avenir.otf');
> }
> 
> function setup() {
>   var myDiv = createDiv('hello there');
>   myDiv.style('font-family', 'Avenir');
> }
> 
> ```
> 
> 

The problem is that you're using the name of the variable to set the DOM element's font, which won't work. You need to use the name of the actual font.

```
var robotoReg = loadFont("Roboto-Regular.ttf");
document.getElementById("mStockOne").style.fontFamily = "Roboto";

```