예제 #1
0
파일: CharAtom.cs 프로젝트: Civa/Zenith
 private CharInfo GetCharInfo(ITeXFont texFont, TexStyle style)
 {
     if (this.TextStyle == null)
         return texFont.GetDefaultCharInfo(this.Character, style);
     else
         return texFont.GetCharInfo(this.Character, this.TextStyle, style);
 }
예제 #2
0
 private CharInfo GetCharInfo(ITeXFont texFont, TexStyle style)
 {
     if (this.TextStyle == null)
     {
         return(texFont.GetDefaultCharInfo(this.Character, style));
     }
     else
     {
         return(texFont.GetCharInfo(this.Character, this.TextStyle, style));
     }
 }
예제 #3
0
        private TexEnvironment(TexStyle style, ITeXFont texFont, Brush background, Brush foreground)
        {
            if (style == TexStyle.Display || style == TexStyle.Text ||
                style == TexStyle.Script || style == TexStyle.ScriptScript)
                this.Style = style;
            else
                this.Style = TexStyle.Display;

            this.TexFont = texFont;
            this.Background = background;
            this.Foreground = foreground;
        }
예제 #4
0
        private TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont, Brush background, Brush foreground)
        {
            if (style == TexStyle.Display || style == TexStyle.Text ||
                style == TexStyle.Script || style == TexStyle.ScriptScript)
                this.Style = style;
            else
                this.Style = TexStyle.Display;

            this.MathFont = mathFont;
            TextFont = textFont;
            this.Background = background;
            this.Foreground = foreground;
        }
예제 #5
0
        private TexEnvironment(TexStyle style, ITeXFont texFont, Brush background, Brush foreground)
        {
            if (style == TexStyle.Display || style == TexStyle.Text ||
                style == TexStyle.Script || style == TexStyle.ScriptScript)
            {
                this.Style = style;
            }
            else
            {
                this.Style = TexStyle.Display;
            }

            this.TexFont    = texFont;
            this.Background = background;
            this.Foreground = foreground;
        }
예제 #6
0
        public TexEnvironment(
            TexStyle style,
            ITeXFont mathFont,
            ITeXFont textFont,
            Brush?background = null,
            Brush?foreground = null)
        {
            if (style == TexStyle.Display || style == TexStyle.Text ||
                style == TexStyle.Script || style == TexStyle.ScriptScript)
            {
                this.Style = style;
            }
            else
            {
                this.Style = TexStyle.Display;
            }

            this.MathFont   = mathFont;
            TextFont        = textFont;
            this.Background = background;
            this.Foreground = foreground;
        }
예제 #7
0
 public override CharFont GetCharFont(ITeXFont texFont) => texFont.GetCharInfo(Name, TexStyle.Display).GetCharacterFont();
예제 #8
0
 public override Result <CharFont> GetCharFont(ITeXFont texFont) =>
 Result.Ok(this.CharFont);
예제 #9
0
 public TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont)
     : this(style, mathFont, textFont, null, null)
 {
 }
예제 #10
0
 /// <summary>Returns the symbol rendered by font.</summary>
 public abstract Result <CharFont> GetCharFont(ITeXFont texFont);
예제 #11
0
 /// <summary>Checks if the symbol can be rendered by font.</summary>
 public bool IsSupportedByFont(ITeXFont font, TexStyle style) =>
 this.GetCharInfo(font, style).IsSuccess;
예제 #12
0
 /// <summary>Returns a <see cref="CharInfo"/> for this character.</summary>
 protected abstract Result <CharInfo> GetCharInfo(ITeXFont font, TexStyle style);
예제 #13
0
 public override Result <CharFont> GetCharFont(ITeXFont texFont) =>
 // Style is irrelevant here.
 texFont.GetCharInfo(this.Name, TexStyle.Display).Map(ci => ci.GetCharacterFont());
예제 #14
0
 public TexEnvironment(TexStyle style, ITeXFont texFont)
     : this(style, texFont, null, null)
 {
 }
예제 #15
0
 private CharInfo GetCharInfo(ITeXFont texFont, TexStyle style) =>
 TextStyle is null
         ? texFont.GetDefaultCharInfo(Character, style)
         : texFont.GetCharInfo(Character, TextStyle, style);
예제 #16
0
파일: CharSymbol.cs 프로젝트: Civa/Zenith
 public abstract CharFont GetCharFont(ITeXFont texFont);
예제 #17
0
 public override CharFont GetCharFont(ITeXFont texFont) => CharFont;
예제 #18
0
 public TexEnvironment(TexStyle style, ITeXFont texFont)
     : this(style, texFont, null, null)
 {
 }
 public CharFont GetCharFont(ITeXFont texFont)
 {
     return(((CharSymbol)this.Atom).GetCharFont(texFont));
 }
예제 #20
0
파일: CharAtom.cs 프로젝트: olesar/Altaxo
 protected override Result <CharInfo> GetCharInfo(ITeXFont texFont, TexStyle style) =>
 this.IsDefaultTextStyle
         ? texFont.GetDefaultCharInfo(this.Character, style)
         : texFont.GetCharInfo(this.Character, this.TextStyle, style);
예제 #21
0
파일: DummyAtom.cs 프로젝트: Civa/Zenith
 public CharFont GetCharFont(ITeXFont texFont)
 {
     return ((CharSymbol)this.Atom).GetCharFont(texFont);
 }
예제 #22
0
파일: CharAtom.cs 프로젝트: Civa/Zenith
 public override CharFont GetCharFont(ITeXFont texFont)
 {
     // Style is irrelevant here.
     return GetCharInfo(texFont, TexStyle.Display).GetCharacterFont();
 }
예제 #23
0
 public CharFont GetCharFont(ITeXFont texFont) => ((CharSymbol)Atom).GetCharFont(texFont);
예제 #24
0
 protected override Result <CharInfo> GetCharInfo(ITeXFont font, TexStyle style) =>
 font.GetCharInfo(this.Name, style);
예제 #25
0
 public override CharFont GetCharFont(ITeXFont texFont)
 {
     return(this.CharFont);
 }
예제 #26
0
 public abstract CharFont GetCharFont(ITeXFont texFont);
예제 #27
0
 public override CharFont GetCharFont(ITeXFont texFont)
 {
     // Style is irrelevant here.
     return(texFont.GetCharInfo(Name, TexStyle.Display).GetCharacterFont());
 }
예제 #28
0
파일: DummyAtom.cs 프로젝트: Xornent/simula
 public Result <CharFont> GetCharFont(ITeXFont texFont) =>
 ((CharSymbol)this.Atom).GetCharFont(texFont);
예제 #29
0
 public override CharFont GetCharFont(ITeXFont texFont)
 {
     return this.CharFont;
 }