Esempio n. 1
0
        public static SW.FontWeight ToWpfFontWeight(this FontWeight value)
        {
            if (value == FontWeight.Ultralight)
            {
                return(SW.FontWeights.UltraLight);
            }
            if (value == FontWeight.Light)
            {
                return(SW.FontWeights.Light);
            }
            if (value == FontWeight.Semibold)
            {
                return(SW.FontWeights.SemiBold);
            }
            if (value == FontWeight.Bold)
            {
                return(SW.FontWeights.Bold);
            }
            if (value == FontWeight.Ultrabold)
            {
                return(SW.FontWeights.UltraBold);
            }
            if (value == FontWeight.Heavy)
            {
                return(SW.FontWeights.Black);
            }

            return(SW.FontWeights.Normal);
        }
Esempio n. 2
0
 private LRTF.FontStyle Convert(XD.FontWeight fontWeight)
 {
     if (fontWeight == XD.FontWeight.Bold)
     {
         return(LRTF.FontStyle.Bold);
     }
     return(LRTF.FontStyle.Normal);
 }
Esempio n. 3
0
        public static SW.FontWeight ToWpfFontWeight(this FontWeight value)
        {
            if (value == FontWeight.Ultrathin)
            {
                return(SW.FontWeights.Thin);
            }
            if (value == FontWeight.Thin)
            {
                return(SW.FontWeights.Thin);
            }
            if (value == FontWeight.Ultralight)
            {
                return(SW.FontWeights.UltraLight);
            }
            if (value == FontWeight.Light)
            {
                return(SW.FontWeights.Light);
            }
            if (value == FontWeight.Semilight)
            {
                return(SW.FontWeights.Light);
            }
            if (value == FontWeight.Book)
            {
                return(SW.FontWeights.Normal);
            }
            if (value == FontWeight.Normal)
            {
                return(SW.FontWeights.Normal);
            }
            if (value == FontWeight.Medium)
            {
                return(SW.FontWeights.Medium);
            }
            if (value == FontWeight.Mediumbold)
            {
                return(SW.FontWeights.Medium);
            }
            if (value == FontWeight.Semibold)
            {
                return(SW.FontWeights.SemiBold);
            }
            if (value == FontWeight.Bold)
            {
                return(SW.FontWeights.Bold);
            }
            if (value == FontWeight.Ultrabold)
            {
                return(SW.FontWeights.UltraBold);
            }
            if (value == FontWeight.Heavy)
            {
                return(SW.FontWeights.Black);
            }
            if (value == FontWeight.Ultraheavy)
            {
                return(SW.FontWeights.UltraBlack);
            }
            if (value == FontWeight.Semiblack)
            {
                return(SW.FontWeights.UltraBlack);
            }
            if (value == FontWeight.Black)
            {
                return(SW.FontWeights.UltraBlack);
            }
            if (value == FontWeight.Ultrablack)
            {
                return(SW.FontWeights.UltraBlack);
            }

            return(SW.FontWeights.Normal);
        }