Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.*;

public class Main {
    public static String getHTMLFontStyle(Font font) {
        StringBuffer out = new StringBuffer();
        out.append("font-size: " + font.getSize() + "px; ");
        out.append("font-family: " + font.getSize() + "; ");
        if (font.isItalic())
            out.append("font-style: italic; ");
        if (font.isBold())
            out.append("font-weight: bold; ");
        return out.toString();
    }
}