@Test public void testSetBasePath() { Font.setBasePath(""); assertThat(Font.create(FONT_PATH).getFilePath(), is(FONT_PATH)); Font.setBasePath("fonts" + File.separator); assertThat(Font.create(FONT_PATH).getFilePath(), is("fonts" + File.separator + FONT_PATH)); Font.setBasePath(null); assertThat(Font.create(FONT_PATH).getFilePath(), is("font" + File.separator + FONT_PATH)); }
public static void setBasePath(@Nullable final String basePath) { Font.basePath = basePath == null ? FONT_DIR : basePath; }
Font { public static void setBasePath(@Nullable final String basePath) { Font.basePath = basePath == null ? FONT_DIR : basePath; } }
Font { public static void setBasePath(@Nullable final String basePath) { Font.basePath = basePath == null ? FONT_DIR : basePath; } Font(@NonNull final String filePath); }
Font { public static void setBasePath(@Nullable final String basePath) { Font.basePath = basePath == null ? FONT_DIR : basePath; } Font(@NonNull final String filePath); static void setLogLevel(final int level); static void setBasePath(@Nullable final String basePath); @Nullable static Font create(
			@NonNull final Context context,
			@Nullable final AttributeSet attrs,
			@AttrRes final int defStyleAttr,
			@StyleRes final int defStyleRes
	); @Nullable static Font create(@NonNull final Context context, @StyleRes final int style); @NonNull static Font create(@NonNull final String filePath); static void clearCache(); @NonNull String getFilePath(); @NonNull Typeface getTypeface(@NonNull final Context context); }
Font { public static void setBasePath(@Nullable final String basePath) { Font.basePath = basePath == null ? FONT_DIR : basePath; } Font(@NonNull final String filePath); static void setLogLevel(final int level); static void setBasePath(@Nullable final String basePath); @Nullable static Font create(
			@NonNull final Context context,
			@Nullable final AttributeSet attrs,
			@AttrRes final int defStyleAttr,
			@StyleRes final int defStyleRes
	); @Nullable static Font create(@NonNull final Context context, @StyleRes final int style); @NonNull static Font create(@NonNull final String filePath); static void clearCache(); @NonNull String getFilePath(); @NonNull Typeface getTypeface(@NonNull final Context context); static final String TTF_SUFFIX; static final String FONT_DIR; }