Lines Matching refs:path
187 * @param path The file name of the font data in the assets directory
190 public static Typeface createFromAsset(AssetManager mgr, String path) {
193 final String key = createAssetUid(mgr, path);
198 if (fontFamily.addFontFromAsset(mgr, path)) {
206 throw new RuntimeException("Font asset not found " + path);
210 * Creates a unique id for a given AssetManager and asset path.
213 * @param path The path for the asset.
214 * @return Unique id for a given AssetManager and asset path.
216 private static String createAssetUid(final AssetManager mgr, String path) {
224 builder.append(path);
231 * @param path The path to the font data.
234 public static Typeface createFromFile(File path) {
235 return createFromFile(path.getAbsolutePath());
241 * @param path The full path to the font data.
244 public static Typeface createFromFile(String path) {
247 if (fontFamily.addFont(path, 0 /* ttcIndex */)) {
252 throw new RuntimeException("Font not found " + path);