コード例 #1
0
        private void ChangeFontTypeface_Click(object sender, EventArgs e)
        {
Redo:
            try
            {
                FontTypeface.Font = Properties.Settings.Default.CounterFont;
                if (FontTypeface.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        Properties.Settings.Default.CounterFont = FontTypeface.Font;
                        Properties.Settings.Default.Save();
                        Data.OsuemSize = Properties.Settings.Default.CounterFont.Size;
                        PushFrame(true);
                    }
                    catch
                    {
                        MessageBox.Show("Error.");
                        goto Redo;
                    }
                }
            }
            catch
            {
                MessageBox.Show("You can only use TrueType fonts!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                goto Redo;
            }
        }
コード例 #2
0
ファイル: FontHandler.cs プロジェクト: CheckTech/Eto
 public void Create(FontTypeface face, float size, FontDecoration decoration)
 {
     typeface       = face;
     Control        = ((FontTypefaceHandler)face.Handler).Control.Describe();
     Size           = size;
     FontDecoration = decoration;
 }
コード例 #3
0
 public void Create(FontTypeface face, float size, FontDecoration decoration)
 {
     typeface        = face;
     family          = face.Family;
     Control         = ((FontTypefaceHandler)face.Handler).CreateFont(size);
     this.decoration = decoration;
 }
コード例 #4
0
 public static Pango.FontFace ToPango(this FontTypeface typeface)
 {
     if (typeface == null)
     {
         return(null);
     }
     return(((FontTypefaceHandler)typeface.Handler).Control);
 }
コード例 #5
0
        public void Create(FontTypeface typeface, float size, FontDecoration decoration)
        {
            this.typeface = typeface;

            var familyHandler = (FontFamilyHandler)typeface.Family.Handler;

            Control = new sd.Font(familyHandler.Control, size, typeface.FontStyle.ToSD() | decoration.ToSD());
        }
コード例 #6
0
ファイル: FontHandler.cs プロジェクト: pcdummy/Eto
 public void Create(FontTypeface typeface, float size)
 {
     this.typeface      = typeface;
     this.Family        = typeface.Family;
     this.Size          = size;
     this.WpfFontWeight = WpfTypeface.Weight;
     this.WpfFontStyle  = WpfTypeface.Style;
 }
コード例 #7
0
 public void Create(FontTypeface typeface, float size, FontDecoration decoration)
 {
     this.typeface = typeface;
     Family        = typeface.Family;
     Size          = size;
     WpfFontWeight = WpfTypeface.Weight;
     WpfFontStyle  = WpfTypeface.Style;
     SetDecorations(decoration);
 }
コード例 #8
0
        public void SetTypeface(Range <int> range, FontTypeface typeface)
        {
            var pangoFace = typeface.ToPango();

            ApplyTag(FamilyTagPrefix, pangoFace.FaceName, range, tag =>
            {
                tag.Family    = pangoFace.FaceName;
                tag.FamilySet = true;
            });
            Callback.OnTextChanged(Widget, EventArgs.Empty);
        }
コード例 #9
0
        public void Create(FontTypeface typeface, float size, FontDecoration decoration)
        {
            family        = typeface.Family;
            this.typeface = typeface;
            var typefaceHandler = (FontTypefaceHandler)typeface.Handler;

            Control        = typefaceHandler.Font;
            FontStyle      = Control.ToEtoStyle();
            FontDecoration = decoration;
            Size           = size;
        }
コード例 #10
0
ファイル: FontHandler.cs プロジェクト: pcdummy/Eto
        public void Create(FontTypeface typeface, float size)
        {
            this.typeface = typeface;

            Control = new SD.Font(typeface.Family.Name, size, typeface.FontStyle.ToSD());
        }
コード例 #11
0
 public static sd.FontStyle ToSD(this FontTypeface typeface)
 {
     return(FontTypefaceHandler.GetControl(typeface));
 }
コード例 #12
0
ファイル: FontHandler.cs プロジェクト: philstopford/Eto
 public void Create(FontTypeface typeface, float size, FontDecoration decoration)
 {
     this.size    = size;
     this.Control = ag.Typeface.Create(typeface.Family.Name, typeface.FontStyle.ToAndroid());
 }
コード例 #13
0
 public void Create(FontTypeface typeface, float size, FontDecoration decoration)
 {
     Typeface       = typeface;
     Size           = size;
     FontDecoration = decoration;
 }
コード例 #14
0
 public static sd.Font ToSDFont(this FontTypeface typeface, float size)
 {
     return(new sd.Font(typeface.Family.ToSD(), size, typeface.ToSD()));
 }
コード例 #15
0
 public void Create(FontTypeface face, float size)
 {
     this.face = face;
     Control   = ((FontTypefaceHandler)face.Handler).Control.Describe();
     Size      = size;
 }
コード例 #16
0
        public void SetTypeface(Range <int> range, FontTypeface typeface)
        {
            var typefaceName = ((FontTypefaceHandler)typeface.Handler).Name;

            SetFontAttribute(range.ToNS(), true, font => NSFontManager.SharedFontManager.ConvertFont(font, typefaceName));
        }
コード例 #17
0
 public void Create(FontTypeface face, float size)
 {
     this.face    = face;
     this.family  = face.Family;
     this.Control = ((FontTypefaceHandler)face.Handler).CreateFont(size);
 }
コード例 #18
0
ファイル: FontHandler.cs プロジェクト: pcdummy/Eto
 public void Create(FontTypeface typeface, float sizeInPoints)
 {
     this.sizeInPoints = sizeInPoints;
     Create(typeface.Name, sizeInPoints, typeface.FontStyle);
 }