using System;
#if TEXTMESHPRO_INSTALLED
using TMPro;
#endif
using UnityEngine;
namespace EasyTalk.Display.Style
{
///
/// This class defines styling for text elements.
///
[Serializable]
public class TextStyleSettings
{
///
/// Whether the text is enabled.
///
[SerializeField] public bool enabled = true;
#if TEXTMESHPRO_INSTALLED
///
/// The TextMeshPro font to use.
///
[SerializeField] public TMP_FontAsset tmpFont;
#endif
///
/// The font to use.
///
[SerializeField] public Font font;
///
/// The color to use for the text.
///
[SerializeField] public Color color;
///
/// The font size to use.
///
[SerializeField] public float fontSize = 24.0f;
///
/// Whether the font should be automatically resized for the best fit of the text.
///
[SerializeField] public bool autoSizeFont = true;
///
/// The minimum font size to use when in auto-size mode.
///
[SerializeField] public float minFontSize = 8.0f;
///
/// The maximum font size to use when in auto-size mode.
///
[SerializeField] public float maxFontSize = 72.0f;
///
/// Gets or sets the standard Font.
///
public Font StandardFont
{
get { return this.font; }
set { this.font = value; }
}
#if TEXTMESHPRO_INSTALLED
///
/// Gets or sets the TextMeshPro Font.
///
public TMP_FontAsset TMPFont
{
get { return tmpFont; }
set { tmpFont = value; }
}
#endif
}
}