1 /* 2 * Copyright 2011 Google Inc. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.typography.font.sfntly.testutils; 18 19 20 import java.io.File; 21 22 /** 23 * Holds TestFontNames enums which can be loaded into Fonts. Later, this will 24 * have support for checking the fingerprints to make sure that the fonts 25 * haven't been changed. 26 * 27 * @author Vinay Shah 28 * 29 */ 30 public class TestFont { 31 32 private static final String TESTDATA_PATH = "../data/testdata/"; 33 34 public enum TestFontNames { 35 DROIDSANS("DroidSans-Regular.ttf"), 36 OPENSANS("OpenSans-Regular.ttf"), 37 ROBOTO("Roboto-Regular.ttf"); 38 39 private String path; 40 TestFontNames(String path)41 private TestFontNames(String path) { 42 this.path = path; 43 } 44 getFile()45 public File getFile() { 46 return new File(TESTDATA_PATH + path); 47 } 48 } 49 } 50