Ejemplo n.º 1
0
 public static FontWeight ToXwtWeight(SD.FontStyle style)
 {
     if (style == SD.FontStyle.Bold)
     {
         return(FontWeight.Bold);
     }
     return(FontWeight.Normal);
 }
Ejemplo n.º 2
0
        //
        // Font
        //
        public static SD.Font ToDrawingFont(this Font font)
        {
            SD.FontStyle style = font.Style.ToDrawingFontStyle();
            if (font.Weight > FontWeight.Normal)
            {
                style |= SD.FontStyle.Bold;
            }

            return(new SD.Font(font.Family, (float)font.Size, style));
        }
Ejemplo n.º 3
0
        public static FontStyle ToXwt(this SD.FontStyle value)
        {
            var result = FontStyle.Normal;

            if (value == null)
            {
                return(result);
            }
            if ((value & SD.FontStyle.Italic) != 0)
            {
                result |= FontStyle.Italic;
            }
            //if ((value & SD.FontStyle.Underline) != 0) {
            //    result |= FontStyle.Underline;
            //}
            if ((value & SD.FontStyle.Bold) != 0)
            {
                result |= FontStyle.Oblique;
            }
            return(result);
        }