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)
33
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, false, cBState);
70
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, false, cBState);
80
State.FontFace(SystemFonts.
DefaultFont
.Name)
107
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, textFormat, false, cBState);
117
State.FontFace(SystemFonts.
DefaultFont
.Name)
141
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, TextFormatFlags.Default, focus, cBState, HWND.Null);
151
State.FontFace(SystemFonts.
DefaultFont
.Name)
System\Windows\Forms\DataGridViewCellStyleTests.cs (16)
47
Font = SystemFonts.
DefaultFont
,
64
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
262
yield return new object[] { SystemFonts.
DefaultFont
};
285
Font = SystemFonts.
DefaultFont
624
Font = SystemFonts.
DefaultFont
,
642
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
667
Font = SystemFonts.
DefaultFont
,
684
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
715
Font = SystemFonts.
DefaultFont
,
732
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
781
Font = SystemFonts.
DefaultFont
,
798
Assert.Equal(SystemFonts.
DefaultFont
, style.Font);
840
Font font = SystemFonts.
DefaultFont
;
1072
new DataGridViewCellStyle { Font = SystemFonts.
DefaultFont
},
1073
$"DataGridViewCellStyle {{ Font={SystemFonts.
DefaultFont
} }}"
1121
Font font = SystemFonts.
DefaultFont
;
System\Windows\Forms\DataGridViewCellTests.cs (24)
5256
int height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default);
5259
height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default, out bool widthTruncated);
5271
int height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 20, TextFormatFlags.Default);
5274
height = DataGridViewCell.MeasureTextHeight(graphics, text, SystemFonts.
DefaultFont
, 20, TextFormatFlags.Default, out bool widthTruncated);
5283
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default));
5284
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default, out widthTruncated));
5307
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, maxWidth, TextFormatFlags.Default));
5308
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, maxWidth, TextFormatFlags.Default, out widthTruncated));
5319
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, 10, flags));
5320
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.
DefaultFont
, 10, flags, out widthTruncated));
5330
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.
DefaultFont
, 0.2f, TextFormatFlags.Default));
5344
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text, SystemFonts.
DefaultFont
, 0.2f, flags));
5350
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text", SystemFonts.
DefaultFont
, 0.2f, TextFormatFlags.Default));
5368
Assert.Throws<ArgumentOutOfRangeException>("maxRatio", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.
DefaultFont
, maxRatio, TextFormatFlags.Default));
5377
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.
DefaultFont
, 0.2f, flags));
5386
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.
DefaultFont
, TextFormatFlags.Default));
5400
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text, SystemFonts.
DefaultFont
, flags));
5406
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text", SystemFonts.
DefaultFont
, TextFormatFlags.Default));
5423
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text", SystemFonts.
DefaultFont
, flags));
5432
Assert.Equal(0, DataGridViewCell.MeasureTextWidth(graphics, text, SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default));
5446
Assert.NotEqual(0, DataGridViewCell.MeasureTextWidth(graphics, text, SystemFonts.
DefaultFont
, 10, flags));
5452
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text", SystemFonts.
DefaultFont
, 10, TextFormatFlags.Default));
5470
Assert.Throws<ArgumentOutOfRangeException>("maxHeight", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.
DefaultFont
, maxHeight, TextFormatFlags.Default));
5479
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.
DefaultFont
, 10, flags));
System\Windows\Forms\DataGridViewRowTests.cs (1)
2058
Font font1 = SystemFonts.
DefaultFont
;
System\Windows\Forms\DrawItemEventArgsTests.cs (12)
16
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.WindowText, SystemColors.Window };
17
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight };
18
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.WindowText, SystemColors.Window };
19
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.WindowText, SystemColors.Window };
41
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue };
42
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue };
43
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue };
44
yield return new object[] { SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue };
67
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None));
68
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.
DefaultFont
, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue));
93
DrawItemEventArgs e = new(graphics, SystemFonts.
DefaultFont
, bounds, -1, state);
103
DrawItemEventArgs e = new(graphics, SystemFonts.
DefaultFont
, bounds, -1, state);
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (11)
16
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
17
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
18
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
42
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
));
51
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, 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
};
69
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
70
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
92
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
);
101
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue, SystemFonts.
DefaultFont
);
108
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)
16
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
17
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
};
40
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
41
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue, SystemFonts.
DefaultFont
};
42
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)
65
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, false, rBState);
75
State.FontFace(SystemFonts.
DefaultFont
.Name)
102
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text, SystemFonts.
DefaultFont
, textFormat, false, rBState);
134
SystemFonts.
DefaultFont
,
149
State.FontFace(SystemFonts.
DefaultFont
.Name)
System\Windows\Forms\TextBoxRendererTests.cs (4)
69
TextBoxRenderer.DrawTextBox(graphics, bounds, "text", SystemFonts.
DefaultFont
, tBState);
81
State.FontFace(SystemFonts.
DefaultFont
.Name)
105
TextBoxRenderer.DrawTextBox(graphics, bounds, "text", SystemFonts.
DefaultFont
, textBounds, tBState);
117
State.FontFace(SystemFonts.
DefaultFont
.Name)
System\Windows\Forms\TextRendererTests.cs (10)
584
State.FontFace(SystemFonts.
DefaultFont
.Name),
593
TextRenderer.DrawText(context, "Acrylic", SystemFonts.
DefaultFont
,
678
SystemFonts.
DefaultFont
,
688
State.FontFace(SystemFonts.
DefaultFont
.Name),
701
SystemFonts.
DefaultFont
,
711
State.FontFace(SystemFonts.
DefaultFont
.Name),
732
SystemFonts.
DefaultFont
,
771
SystemFonts.
DefaultFont
,
787
State.FontFace(SystemFonts.
DefaultFont
.Name),
819
SystemFonts.
DefaultFont
,
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (8)
15
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, TextFormatFlags.Top };
16
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, TextFormatFlags.Bottom };
40
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 };
41
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 };
42
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 };
68
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, TextFormatFlags.Top));
69
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.
DefaultFont
, ContentAlignment.TopLeft));
84
ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue, SystemFonts.
DefaultFont
, TextFormatFlags.Top)