All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.uniroma2.art.semanticturkey.font.FontClass Maven / Gradle / Ivy

There is a newer version: 13.0
Show newest version
package it.uniroma2.art.semanticturkey.font;

import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

public class FontClass {
	private List fontFileNameList = new ArrayList<>();
	private final String PACKACE_PATH = "it/uniroma2/art/semanticturkey/font/";

	public FontClass() {
		fontFileNameList.add("arial-unicode-ms.ttf");
	}

	public List getFontFileNameList() {
		return fontFileNameList;
	}

	public InputStream getFontFile(String fontFileName) throws IOException {
		String packageAndFile = PACKACE_PATH+fontFileName;
		InputStream inputStream = (new ClassPathResource(packageAndFile, FontClass.class.getClassLoader())).getInputStream();
		return inputStream;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy