111 references to DefaultFont
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
HasValidFonts.vb (1)
17
Dim result = SystemFonts.
DefaultFont
System.Drawing.Common.Tests (6)
System\Drawing\FontTests.cs (4)
717
Assert.Equal(SystemFonts.
DefaultFont
.GdiCharSet <= 2 ? font.GdiCharSet : SystemFonts.
DefaultFont
.GdiCharSet, logFont.lfCharSet);
751
Assert.Equal(SystemFonts.
DefaultFont
.GdiCharSet <= 2 ? font.GdiCharSet : SystemFonts.
DefaultFont
.GdiCharSet, logFont.lfCharSet);
System\Drawing\GraphicsTests.cs (2)
2784
graphics.DrawString("Test text", SystemFonts.
DefaultFont
, Brushes.White, default(Point));
2796
() => graphics.DrawString("Test text", SystemFonts.
DefaultFont
, Brushes.White, default(Point)));
System.Windows.Forms (1)
System\Windows\Forms\Help\Help.cs (1)
88
Font font = SystemFonts.StatusFont ?? SystemFonts.
DefaultFont
;
System.Windows.Forms.Tests (103)
System\Windows\Forms\CheckBoxRendererTests.cs (7)
31
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, false, cBState);
68
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, false, cBState);
78
State.FontFace(SystemFonts.
DefaultFont
.Name)
105
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, textFormat, false, cBState);
115
State.FontFace(SystemFonts.
DefaultFont
.Name)
139
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, TextFormatFlags.Default, focus, cBState, HWND.Null);
149
State.FontFace(SystemFonts.
DefaultFont
.Name)
System\Windows\Forms\DataGridViewCellStyleTests.cs (16)
45
Font = SystemFonts.
DefaultFont
,
62
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
261
yield return new object[] { SystemFonts.
DefaultFont
};
284
Font = SystemFonts.
DefaultFont
623
Font = SystemFonts.
DefaultFont
,
641
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
666
Font = SystemFonts.
DefaultFont
,
683
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
714
Font = SystemFonts.
DefaultFont
,
731
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
781
Font = SystemFonts.
DefaultFont
,
798
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
841
Font font = SystemFonts.
DefaultFont
;
1073
new DataGridViewCellStyle { Font = SystemFonts.
DefaultFont
},
1074
$"DataGridViewCellStyle {{ Font={SystemFonts.
DefaultFont
} }}"
1122
Font font = SystemFonts.
DefaultFont
;
System\Windows\Forms\DataGridViewCellTests.cs (24)
5254
int height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default);
5257
height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default, out bool widthTruncated);
5269
int height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 20, TextFormatFlags.Default);
5272
height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 20, TextFormatFlags.Default, out bool widthTruncated);
5281
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default));
5282
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default, out widthTruncated));
5305
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, maxWidth, TextFormatFlags.Default));
5306
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, maxWidth, TextFormatFlags.Default, out widthTruncated));
5317
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, 10, flags));
5318
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, 10, flags, out widthTruncated));
5328
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.
DefaultFont
, 0.2f, TextFormatFlags.Default));
5342
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.
DefaultFont
, 0.2f, flags));
5348
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text", SystemFonts.
DefaultFont
, 0.2f, TextFormatFlags.Default));
5366
Assert.Throws<ArgumentOutOfRangeException>("maxRatio", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.
DefaultFont
, maxRatio, TextFormatFlags.Default));
5375
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.
DefaultFont
, 0.2f, flags));
5384
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.
DefaultFont
, TextFormatFlags.Default));
5398
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.
DefaultFont
, flags));
5404
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text", SystemFonts.
DefaultFont
, TextFormatFlags.Default));
5421
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text", SystemFonts.
DefaultFont
, flags));
5430
Assert.Equal(0, DataGridViewCell.MeasureTextWidth(graphics, text, SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default));
5444
Assert.NotEqual(0, DataGridViewCell.MeasureTextWidth(graphics, text, SystemFonts.
DefaultFont
, 10, flags));
5450
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text", SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default));
5468
Assert.Throws<ArgumentOutOfRangeException>("maxHeight", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.
DefaultFont
, maxHeight, TextFormatFlags.Default));
5477
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.
DefaultFont
, 10, flags));
System\Windows\Forms\DataGridViewRowTests.cs (1)
2056
Font font1 = SystemFonts.
DefaultFont
;
System\Windows\Forms\DrawItemEventArgsTests.cs (12)
14
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.WindowText, SystemColors.Window };
15
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight };
16
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.WindowText, SystemColors.Window };
17
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.WindowText, SystemColors.Window };
39
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue };
40
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue };
41
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue };
42
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue };
65
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None));
66
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue));
91
DrawItemEventArgs e = new(graphics, SystemFonts.
DefaultFont
, bounds, -1, state);
101
DrawItemEventArgs e = new(graphics, SystemFonts.
DefaultFont
, bounds, -1, state);
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (11)
14
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
15
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
16
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
40
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
));
49
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
)
66
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
67
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
68
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
90
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
);
99
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
);
106
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
System\Windows\Forms\DrawToolTipEventArgsTests.cs (5)
14
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
15
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(-1, -2, -3, -4), "toolTipText", Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
38
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
39
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
40
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText", Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
System\Windows\Forms\RadioButtonRendererTests.cs (5)
62
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, false, rBState);
72
State.FontFace(SystemFonts.
DefaultFont
.Name)
99
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, textFormat, false, rBState);
123
SystemFonts.
DefaultFont
,
138
State.FontFace(SystemFonts.
DefaultFont
.Name)
System\Windows\Forms\TextBoxRendererTests.cs (4)
67
TextBoxRenderer.DrawTextBox(graphics, bounds, "text", SystemFonts.
DefaultFont
, tBState);
79
State.FontFace(SystemFonts.
DefaultFont
.Name)
103
TextBoxRenderer.DrawTextBox(graphics, bounds, "text", SystemFonts.
DefaultFont
, textBounds, tBState);
115
State.FontFace(SystemFonts.
DefaultFont
.Name)
System\Windows\Forms\TextRendererTests.cs (10)
582
State.FontFace(SystemFonts.
DefaultFont
.Name),
591
TextRenderer.DrawText(context, "Acrylic", SystemFonts.
DefaultFont
,
676
SystemFonts.
DefaultFont
,
686
State.FontFace(SystemFonts.
DefaultFont
.Name),
699
SystemFonts.
DefaultFont
,
709
State.FontFace(SystemFonts.
DefaultFont
.Name),
730
SystemFonts.
DefaultFont
,
769
SystemFonts.
DefaultFont
,
785
State.FontFace(SystemFonts.
DefaultFont
.Name),
817
SystemFonts.
DefaultFont
,
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (8)
13
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, TextFormatFlags.Top };
14
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, TextFormatFlags.Bottom };
38
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, ContentAlignment.MiddleCenter, TextFormatFlags.Default | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
39
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, ContentAlignment.BottomRight, TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.HidePrefix };
40
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, (ContentAlignment)(-1), TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.RightToLeft | TextFormatFlags.HidePrefix };
66
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, TextFormatFlags.Top));
67
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, ContentAlignment.TopLeft));
82
ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue, SystemFonts.
DefaultFont
, TextFormatFlags.Top)