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); }
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)); } }
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; }
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; }
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; }
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; }
public override CharFont GetCharFont(ITeXFont texFont) => texFont.GetCharInfo(Name, TexStyle.Display).GetCharacterFont();
public override Result <CharFont> GetCharFont(ITeXFont texFont) => Result.Ok(this.CharFont);
public TexEnvironment(TexStyle style, ITeXFont mathFont, ITeXFont textFont) : this(style, mathFont, textFont, null, null) { }
/// <summary>Returns the symbol rendered by font.</summary> public abstract Result <CharFont> GetCharFont(ITeXFont texFont);
/// <summary>Checks if the symbol can be rendered by font.</summary> public bool IsSupportedByFont(ITeXFont font, TexStyle style) => this.GetCharInfo(font, style).IsSuccess;
/// <summary>Returns a <see cref="CharInfo"/> for this character.</summary> protected abstract Result <CharInfo> GetCharInfo(ITeXFont font, TexStyle style);
public override Result <CharFont> GetCharFont(ITeXFont texFont) => // Style is irrelevant here. texFont.GetCharInfo(this.Name, TexStyle.Display).Map(ci => ci.GetCharacterFont());
public TexEnvironment(TexStyle style, ITeXFont texFont) : this(style, texFont, null, null) { }
private CharInfo GetCharInfo(ITeXFont texFont, TexStyle style) => TextStyle is null ? texFont.GetDefaultCharInfo(Character, style) : texFont.GetCharInfo(Character, TextStyle, style);
public abstract CharFont GetCharFont(ITeXFont texFont);
public override CharFont GetCharFont(ITeXFont texFont) => CharFont;
public CharFont GetCharFont(ITeXFont texFont) { return(((CharSymbol)this.Atom).GetCharFont(texFont)); }
protected override Result <CharInfo> GetCharInfo(ITeXFont texFont, TexStyle style) => this.IsDefaultTextStyle ? texFont.GetDefaultCharInfo(this.Character, style) : texFont.GetCharInfo(this.Character, this.TextStyle, style);
public CharFont GetCharFont(ITeXFont texFont) { return ((CharSymbol)this.Atom).GetCharFont(texFont); }
public override CharFont GetCharFont(ITeXFont texFont) { // Style is irrelevant here. return GetCharInfo(texFont, TexStyle.Display).GetCharacterFont(); }
public CharFont GetCharFont(ITeXFont texFont) => ((CharSymbol)Atom).GetCharFont(texFont);
protected override Result <CharInfo> GetCharInfo(ITeXFont font, TexStyle style) => font.GetCharInfo(this.Name, style);
public override CharFont GetCharFont(ITeXFont texFont) { return(this.CharFont); }
public override CharFont GetCharFont(ITeXFont texFont) { // Style is irrelevant here. return(texFont.GetCharInfo(Name, TexStyle.Display).GetCharacterFont()); }
public Result <CharFont> GetCharFont(ITeXFont texFont) => ((CharSymbol)this.Atom).GetCharFont(texFont);
public override CharFont GetCharFont(ITeXFont texFont) { return this.CharFont; }