Ejemplo n.º 1
0
        /// <summary>
        /// Retrieves the string representation of a <see cref="TournamentTypeface"/>.
        /// </summary>
        /// <param name="typeface">The <see cref="TournamentTypeface"/>.</param>
        /// <returns>The string representation.</returns>
        public static string GetFamilyString(TournamentTypeface typeface)
        {
            switch (typeface)
            {
            case TournamentTypeface.Aquatico:
                return("Aquatico");
            }

            return(null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Retrieves the string representation of a <see cref="FontWeight"/>.
 /// </summary>
 /// <param name="typeface">The <see cref="TournamentTypeface"/>.</param>
 /// <param name="weight">The <see cref="FontWeight"/>.</param>
 /// <returns>The string representation of <paramref name="weight"/> in the specified <paramref name="typeface"/>.</returns>
 public static string GetWeightString(TournamentTypeface typeface, FontWeight weight)
 => GetWeightString(GetFamilyString(typeface), weight);
Ejemplo n.º 3
0
 /// <summary>
 /// Retrieves a <see cref="FontUsage"/>.
 /// </summary>
 /// <param name="typeface">The font typeface.</param>
 /// <param name="size">The size of the text in local space. For a value of 16, a single line will have a height of 16px.</param>
 /// <param name="weight">The font weight.</param>
 /// <param name="italics">Whether the font is italic.</param>
 /// <param name="fixedWidth">Whether all characters should be spaced the same distance apart.</param>
 /// <returns>The <see cref="FontUsage"/>.</returns>
 public static FontUsage GetFont(TournamentTypeface typeface = TournamentTypeface.Aquatico, float size = DEFAULT_FONT_SIZE, FontWeight weight = FontWeight.Medium, bool italics = false, bool fixedWidth = false)
 => new FontUsage(GetFamilyString(typeface), size, GetWeightString(typeface, weight), italics, fixedWidth);