Java tutorial
//package com.java2s; import java.awt.Font; public class Main { /** * Retrieve and transform the property value into a Font. * @param name The property name * @return A valid font (or null if invalid) * @throws IOException If an error occurred while accessing the properties file. */ public static Font asFont(String font) { if (font != null) return Font.decode(font); return null; } }