Skip to content

Commit bff8ce5

Browse files
committed
* add new constructor for GenericFont
1 parent 4deccc0 commit bff8ce5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

library-core/src/main/java/com/mikepenz/iconics/typeface/GenericFont.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
* Created by mikepenz on 01.11.14.
3131
*/
3232
public class GenericFont implements ITypeface {
33+
private String mFontName = "GenericFont";
34+
private String mAuthor = "GenericAuthor";
3335
private String mMappingPrefix;
3436
private String mFontFile;
3537

@@ -44,6 +46,13 @@ public GenericFont(String mappingPrefix, String fontFile) {
4446
this.mFontFile = fontFile;
4547
}
4648

49+
public GenericFont(String fontName, String author, String mappingPrefix, String fontFile) {
50+
this.mFontName = fontName;
51+
this.mAuthor = author;
52+
this.mMappingPrefix = mappingPrefix;
53+
this.mFontFile = fontFile;
54+
}
55+
4756
public void registerIcon(String name, char aChar) {
4857
mChars.put(mMappingPrefix + "_" + name, aChar);
4958
}
@@ -65,7 +74,7 @@ public String getMappingPrefix() {
6574

6675
@Override
6776
public String getFontName() {
68-
return "GenericFont";
77+
return mFontName;
6978
}
7079

7180
@Override
@@ -85,7 +94,7 @@ public Collection<String> getIcons() {
8594

8695
@Override
8796
public String getAuthor() {
88-
return "";
97+
return mAuthor;
8998
}
9099

91100
@Override

0 commit comments

Comments
 (0)