diff --git a/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTarget.java b/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTarget.java index e718457..e338087 100755 --- a/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTarget.java +++ b/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTarget.java @@ -49,7 +49,8 @@ public class TapTarget { Rect bounds; Drawable icon; - Typeface typeface; + Typeface titleTypeface; + Typeface descriptionTypeface; @ColorRes private int outerCircleColorRes = -1; @@ -286,7 +287,22 @@ public TapTarget descriptionTextColorInt(@ColorInt int color) { /** Specify the typeface for all text **/ public TapTarget textTypeface(Typeface typeface) { if (typeface == null) throw new IllegalArgumentException("Cannot use a null typeface"); - this.typeface = typeface; + titleTypeface = typeface; + descriptionTypeface = typeface; + return this; + } + + /** Specify the typeface for title text **/ + public TapTarget titleTypeface(Typeface titleTypeface) { + if (titleTypeface == null) throw new IllegalArgumentException("Cannot use a null typeface"); + this.titleTypeface = titleTypeface; + return this; + } + + /** Specify the typeface for description text **/ + public TapTarget descriptionTypeface(Typeface descriptionTypeface) { + if (descriptionTypeface == null) throw new IllegalArgumentException("Cannot use a null typeface"); + this.descriptionTypeface = descriptionTypeface; return this; } diff --git a/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTargetView.java b/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTargetView.java index 7a1b7ea..29f0f34 100755 --- a/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTargetView.java +++ b/taptargetview/src/main/java/com/getkeepsafe/taptargetview/TapTargetView.java @@ -589,9 +589,12 @@ public void getOutline(View view, Outline outline) { descriptionPaint.setColor(titlePaint.getColor()); } - if (target.typeface != null) { - titlePaint.setTypeface(target.typeface); - descriptionPaint.setTypeface(target.typeface); + if (target.titleTypeface != null) { + titlePaint.setTypeface(target.titleTypeface); + } + + if (target.descriptionTypeface != null) { + descriptionPaint.setTypeface(target.descriptionTypeface); } }