I tried to load a custom font, which works. Now I have got the problem Iam not able to use more than one custom font in an application. If i add three labelFields each with a different font, only the last custom font is used for all labels.

If i delete the last setFont for the last label the second font is used. Is there some kind of mechanism which uses only the last font?

Here is the code which add the LabelFields and sets the fonts

```
        LabelField TestLabel1 = new LabelField("Test Label 1");
    Font fo1 = loadCustomFonts("FirstFont.ttf", "FirstFont", 0, 30);

    TestLabel1.setFont(fo1);
    add(TestLabel1);

    LabelField TestLabel2 = new LabelField("Test Label 2");
    Font fo2 = loadCustomFonts("SecondFont.ttf", "SecondFont", 0, 30);
    TestLabel2.setFont(fo2);
    add(TestLabel2);

    LabelField TestLabel3 = new LabelField("Test Label 3");
    Font fo3 =loadCustomFonts("ThirdFont.TTF", "ThirdFont", 0, 30);
    TestLabel3.setFont(fo3);
    add(TestLabel3);

```

Here is my "loadCustomFonts" Method, which loads the custom Font and returns a font object.

```
 public Font loadCustomFonts (String path, String fontname,int fontStyle, int fontSize){ 
InputStream stream = this.getClass().getResourceAsStream(path);
    if (FontManager.getInstance().load(stream, fontname, FontManager.APPLICATION_FONT) == FontManager.SUCCESS){
        try{
            FontFamily family;
            add(new LabelField("A"));
            family = FontFamily.forName(fontname);
            Font myFont = family.getFont(fontStyle,fontSize);
            return myFont;
        } 
        catch (ClassNotFoundException e){System.out.println(e.getMessage());}
    }
    else {
         try{
             FontFamily family;
             add(new LabelField("B"));
             family = FontFamily.forName(fontname);
             Font myFont = family.getFont(fontStyle,fontSize);
             return myFont;
         } 
         catch (ClassNotFoundException e){System.out.println(e.getMessage());}
    }
    return null;
}   

```