Esempio n. 1
0
        public static bool SetFontSize(EFontSize size)
        {
            FontInfo info = GetFontInfo();

            info.FontSize = new Coord(0, (int)size);
            return(SetFont(info));
        }
Esempio n. 2
0
 public FontInfo(EFontFace fontFace, EFontSize fontSize, EFontWeight weight = EFontWeight.Normal)
 {
     SizeInBytes = (uint)Marshal.SizeOf <FontInfo>();
     FontSize    = new Coord(0, (int)fontSize);
     FontWeight  = weight;
     FontIndex   = 0;
     FontFamily  = 54;            //type face font
     SetFace(fontFace);
 }
Esempio n. 3
0
        public static double Get_Font_Size_Keyword_Scaling_Factor(EFontSize size)
        {
            switch (size)
            {
            case EFontSize.XXSmall:
            case EFontSize.XSmall:
            case EFontSize.Small:
            case EFontSize.Medium:
            case EFontSize.Large:
            case EFontSize.XLarge:
            case EFontSize.XXLarge:
                return(FONT_SCALE[(int)size]);

            default:
                return(1.0);
            }
        }
Esempio n. 4
0
 public void SetSize(EFontSize size)
 {
     FontFamily = 54;
     FontSize   = size.ToCoord();
 }
Esempio n. 5
0
 public void SetFontSize(EFontSize size)
 {
     chosenFontSize = size;
     FireOnFontChangedEvent();
 }
Esempio n. 6
0
 public static Coord ToCoord(this EFontSize size)
 {
     return(new Coord(0, (int)size));
 }