// Path: app/src/main/java/com/joanzapata/iconify/Icon.java
// public interface Icon {
// 
//     /** The key of icon, for example 'fa-ok' */
//     String key();
// 
//     /** The character matching the key in the font, for example '\u4354' */
//     char character();
// 
// }


import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.text.style.ReplacementSpan;
import com.joanzapata.iconify.Icon;
package com.joanzapata.iconify.internal;


public class CustomTypefaceSpan extends ReplacementSpan {
    private static final int ROTATION_DURATION = 2000;
    private static final Rect TEXT_BOUNDS = new Rect();
    private static final Paint LOCAL_PAINT = new Paint();
    private static final float BASELINE_RATIO = 1 / 7f;

    private final String icon;
    private final Typeface type;
    private final float iconSizePx;
    private final float iconSizeRatio;
    private final int iconColor;
    private final boolean rotate;
    private final boolean baselineAligned;
    private final long rotationStartTime;

// Path: app/src/main/java/com/joanzapata/iconify/Icon.java
// public interface Icon {
// 
//     /** The key of icon, for example 'fa-ok' */
//     String key();
// 
//     /** The character matching the key in the font, for example '\u4354' */
//     char character();
// 
// }


// Path: app/src/main/java/com/joanzapata/iconify/internal/CustomTypefaceSpan.java
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.text.style.ReplacementSpan;
import com.joanzapata.iconify.Icon;

package com.joanzapata.iconify.internal;


public class CustomTypefaceSpan extends ReplacementSpan {
    private static final int ROTATION_DURATION = 2000;
    private static final Rect TEXT_BOUNDS = new Rect();
    private static final Paint LOCAL_PAINT = new Paint();
    private static final float BASELINE_RATIO = 1 / 7f;

    private final String icon;
    private final Typeface type;
    private final float iconSizePx;
    private final float iconSizeRatio;
    private final int iconColor;
    private final boolean rotate;
    private final boolean baselineAligned;
    private final long rotationStartTime;

    public CustomTypefaceSpan(Icon icon, Typeface type,