Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Font;
import java.io.FileInputStream;
import java.io.InputStream;

public class Main {
    public static void main(String[] args) throws Exception {
        String fontFileName = "yourfont.ttf";
        InputStream is = new FileInputStream(fontFileName);

        Font ttfBase = Font.createFont(Font.TRUETYPE_FONT, is);

        Font ttfReal = ttfBase.deriveFont(Font.PLAIN, 24);
    }

}