This container public class can store the definition for a font and it's style.
Example #1
0
        public void Init(float scale) 
        { 
            Scale = scale;
        
            const string musicFont = "alphaTab";
            const string sansFont = "Arial";
            const string serifFont = "Georgia";
        
            MusicFont = new Font(musicFont, 11 * scale);

            EffectFont = new Font(serifFont, 12 * scale, FontStyle.Italic);
            CopyrightFont = new Font(sansFont, 12 * scale, FontStyle.Bold);
        
            TitleFont = new Font(serifFont, 32 * scale);
            SubTitleFont = new Font(serifFont, 20 * scale);
            WordsFont = new Font(serifFont, 15 * scale);
        
            TablatureFont = new Font(sansFont, 13 * scale); 
            GraceFont = new Font(sansFont, 11 * scale); 
       
            StaveLineColor = new Color(165, 165, 165);
            BarSeperatorColor = new Color(34, 34, 17);
       
            BarNumberFont = new Font(sansFont, 11 * scale); 
            BarNumberColor = new Color(200, 0, 0);

            MarkerFont = new Font(serifFont, 14 * scale, FontStyle.Bold);
            TabClefFont = new Font(sansFont, 18 * scale, FontStyle.Bold);
        
            ScoreInfoColor = new Color(0,0,0);
            MainGlyphColor = new Color(0,0,0);
        }
Example #2
0
 public TextGlyph(float x, float y, string text, Font font, TextAlign textAlign = TextAlign.Left)
     : base(x, y)
 {
     _text = text;
     Font = font;
     TextAlign = textAlign;
 }
Example #3
0
 public Html5Canvas()
 {
     var fontElement = document.createElement("span");
     fontElement.classList.add("at");
     document.body.appendChild(fontElement);
     var style = window.getComputedStyle(fontElement, null);
     _musicFont = new Font(style.fontFamily, Std.ParseFloat(style.fontSize));
 }
Example #4
0
 public SvgCanvas()
 {
     _currentPath = new StringBuilder();
     _currentPathIsEmpty = true;
     Color = new Color(255, 255, 255);
     LineWidth = 1;
     Font = new Font("Arial", 10);
     TextAlign = TextAlign.Left;
     TextBaseline = TextBaseline.Default;
 }