23 package com.realtime.crossfire.jxclient.skin.io;
27 import java.awt.FontFormatException;
28 import java.io.IOException;
29 import java.io.InputStream;
30 import org.jetbrains.annotations.NotNull;
59 public Font
getFont(@NotNull
final String name)
throws IOException {
60 final String filename =
"fonts/"+name+
".ttf";
66 font = Font.createFont(Font.TRUETYPE_FONT, ttf);
67 }
catch (
final FontFormatException ex) {
68 throw new IOException(filename+
": invalid font format: "+ex.getMessage(), ex);
71 }
catch (
final IOException ex) {
72 throw new IOException(
skinSource.
getURI(filename)+
": i/o error: "+ex.getMessage(), ex);