46 instantiations of Font
PresentationUI (3)
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (1)
150
_instructionlabel.Font = new System.Drawing.
Font
("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
228
Font columnHeaderFont = new System.Drawing.
Font
(Font, System.Drawing.FontStyle.Bold);
MS\Internal\Documents\SigningDialog.cs (1)
261
_signerlabel.Font = new
Font
(System.Drawing.SystemFonts.DialogFont, System.Drawing.SystemFonts.DialogFont.Style | FontStyle.Bold);
System.Drawing.Common (11)
System\Drawing\Font.cs (3)
609
return new
Font
(font, logFont.lfCharSet, logFont.IsGdiVerticalFont);
669
return new
Font
(font, 0, gdiVerticalFont: false);
680
return new
Font
(font, _gdiCharSet, _gdiVerticalFont);
System\Drawing\FontConverter.cs (3)
180
return new
Font
(fontName, fontSize, fontStyle, units);
251
return new
Font
(fontName, fontSize, fontStyle, units);
384
return new
Font
(fontFamily, size, style, unit, charSet, vertical);
System\Drawing\SystemFonts.cs (5)
175
defaultFont = new
Font
("Tahoma", 8);
200
defaultFont = new
Font
("Tahoma", 8);
208
defaultFont ??= new
Font
(FontFamily.GenericSansSerif, 8);
238
dialogFont = new
Font
("MS Shell Dlg 2", 8);
264
return new
Font
(font.FontFamily, font.SizeInPoints, font.Style, GraphicsUnit.Point, font.GdiCharSet, font.GdiVerticalFont);
System.Windows.Forms (16)
System\Windows\Forms\ActiveX\AxHost.cs (2)
3709
:
new
(f.Name, f.SizeInPoints, f.Style, GraphicsUnit.Point, f.GdiCharSet, f.GdiVerticalFont);
3792
return new
Font
(
System\Windows\Forms\Controls\Labels\FocusableLabel.cs (2)
42
Font = new
Font
(Font, FontStyle.Underline);
52
Font = new
Font
(Font, FontStyle.Regular);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
533
using Font alwaysUnderlined = new
Font
(Font, Font.Style | FontStyle.Underline);
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (3)
212
hoverLinkFont = new
Font
(f, style);
227
hoverLinkFont = new
Font
(f, hoverStyle);
239
linkFont = new
Font
(f, linkStyle);
System\Windows\Forms\Controls\ListView\ListView.cs (2)
2617
_odCacheFont = new
Font
(_odCacheFont, FontStyle.Bold);
2804
subItemFont = new
Font
(item.SubItems[0].Font, FontStyle.Underline);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
232
_titleLabel.Font =
new
(Font, FontStyle.Bold);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
1327
public Font GetBoldFont() => _boldFont ??= new
Font
(Font, FontStyle.Bold);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2195
return new
Font
(cf.FaceName.ToString(), fontSize, style, GraphicsUnit.Point, cf.bCharSet);
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (2)
144
result = new
Font
(result.FontFamily, MinSize, result.Style, GraphicsUnit.Point);
149
result = new
Font
(result.FontFamily, MaxSize, result.Style, GraphicsUnit.Point);
System\Windows\Forms\Rendering\ControlPaint.cs (1)
2122
=>
new
(
System.Windows.Forms.Design (11)
System\ComponentModel\Design\ByteViewer.cs (2)
37
private static readonly Font s_addressFont =
new
("Microsoft Sans Serif", 8.0f);
38
private static readonly Font s_hexDumpFont =
new
("Courier New", 8.0f);
System\ComponentModel\Design\DesignerActionPanel.HeaderLine.cs (1)
16
protected override Font GetFont() =>
new
(ActionPanel.Font, FontStyle.Bold);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (1)
94
_titleLabel.Font = new
Font
(ActionPanel.Font, FontStyle.Bold);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
305
replaceFont = new
Font
(fallBackFontName, base.Font.Size, base.Font.Style);
System\Drawing\Design\FontNameEditor.cs (1)
72
using Font font =
new
(fontFamily, fontSize, fontStyle, GraphicsUnit.Pixel);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2273
using (Font errorFont =
new
(
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
191
using Font drawFont =
new
("Arial", 8);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
334
label.Font = new
Font
(label.Font, FontStyle.Bold);
System\Windows\Forms\Design\TabOrder.cs (1)
49
_tabFont = new
Font
(_tabFont, FontStyle.Bold);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
864
using Font boldFont =
new
(_selectedItemName.Font, FontStyle.Bold);
System.Windows.Forms.Primitives (1)
System\Windows\Forms\FontExtensions.cs (1)
22
:
new
(
WindowsFormsIntegration (4)
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (4)
140
adapter.Font = new SD.
Font
(familySource, adapter.Font.Size, adapter.Font.Style);
171
adapter.Font = new SD.
Font
(CurrentFontFamily, CurrentFontSize, style);
192
adapter.Font = new SD.
Font
(CurrentFontFamily, CurrentFontSize, style);
208
adapter.Font = new SD.
Font
(CurrentFontFamily, (float)pointSize, CurrentFontStyle);
548 references to Font
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\ApplicationServices\ApplyApplicationDefaultsEventArgs.vb (1)
44
Public Property Font As
Font
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
228
Font
columnHeaderFont = new System.Drawing.Font(Font, System.Drawing.FontStyle.Bold);
System.Drawing (1)
System.Drawing.cs (1)
56
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Font
))]
System.Drawing.Common (156)
System\Drawing\Font.cs (50)
35
/// Gets the em-size of this <see cref="
Font
"/> measured in the units specified by the <see cref="Unit"/> property.
40
/// Gets style information for this <see cref='
Font
'/>.
46
/// Gets a value indicating whether this <see cref='
Font
'/> is bold.
52
/// Gets a value indicating whether this <see cref='
Font
'/> is Italic.
58
/// Gets a value indicating whether this <see cref='
Font
'/> is strikeout (has a line through it).
64
/// Gets a value indicating whether this <see cref='
Font
'/> is underlined.
70
/// Gets the <see cref='Drawing.FontFamily'/> of this <see cref='
Font
'/>.
76
/// Gets the face name of this <see cref='
Font
'/> .
85
/// Gets the unit of measure for this <see cref='
Font
'/>.
117
/// Gets the name of this <see cref='
Font
'/>.
123
/// Returns true if this <see cref='
Font
'/> is a SystemFont.
129
/// Gets the height of this <see cref='
Font
'/>.
140
/// Cleans up Windows resources for this <see cref='
Font
'/>.
166
/// Cleans up Windows resources for this <see cref='
Font
'/>.
225
/// Returns a value indicating whether the specified object is a <see cref='
Font
'/> equivalent to this
226
/// <see cref='
Font
'/>.
235
if (obj is not
Font
font)
253
/// Gets the hash code for this <see cref='
Font
'/>.
258
/// Returns a human-readable string representation of this <see cref='
Font
'/>.
361
/// Initializes a new instance of the <see cref='
Font
'/> class from the specified existing <see cref='
Font
'/>
364
public Font(
Font
prototype, FontStyle newStyle)
372
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
380
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
388
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
396
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
404
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
417
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
425
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
433
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
441
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
449
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
457
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
465
/// Initializes a new instance of the <see cref='
Font
'/> class with the specified attributes.
547
/// Creates a <see cref='
Font
'/> from the specified Windows handle.
549
public static
Font
FromHfont(IntPtr hfont)
558
/// Creates a <see cref="
Font
"/> from the given LOGFONT using the screen device context.
561
/// <returns>The newly created <see cref="
Font
"/>.</returns>
562
public static
Font
FromLogFont(object lf)
573
static
Font
FromLogFont(in LOGFONT logFont)
584
static
Font
FromLogFont(in LOGFONT logFont, IntPtr hdc)
613
/// Creates a <see cref="
Font
"/> from the given LOGFONT using the given device context.
617
/// <returns>The newly created <see cref="
Font
"/>.</returns>
619
public static
Font
FromLogFont(object lf, IntPtr hdc)
651
/// Creates a <see cref="
Font
"/> from the specified handle to a device context (HDC).
653
/// <returns>The newly created <see cref="
Font
"/>.</returns>
654
public static
Font
FromHdc(IntPtr hdc)
673
/// Creates an exact copy of this <see cref='
Font
'/>.
712
/// Returns a handle to this <see cref='
Font
'/>.
731
/// Gets the size, in points, of this <see cref='
Font
'/>.
System\Drawing\FontConverter.cs (6)
29
if (value is
Font
font)
139
if (typeof(
Font
).GetConstructor(types) is { } constructor)
395
if (value is not
Font
)
399
return props.Sort([nameof(
Font
.Name), nameof(
Font
.Size), nameof(
Font
.Unit)]);
System\Drawing\Graphics.cs (73)
1577
/// <see cref="
Font
"/> objects.
1580
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1587
public void DrawString(string? s,
Font
font, Brush brush, float x, float y) =>
1591
/// <inheritdoc cref="DrawString(string?,
Font
, Brush, float, float)"/>
1592
public void DrawString(ReadOnlySpan<char> s,
Font
font, Brush brush, float x, float y) =>
1598
/// <see cref="
Font
"/> objects.
1601
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1607
public void DrawString(string? s,
Font
font, Brush brush, PointF point) =>
1611
/// <inheritdoc cref="DrawString(string?,
Font
, Brush, PointF)"/>
1612
public void DrawString(ReadOnlySpan<char> s,
Font
font, Brush brush, PointF point) =>
1618
/// <see cref="
Font
"/> objects using the formatting attributes of the specified <see cref="StringFormat"/>.
1621
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1632
public void DrawString(string? s,
Font
font, Brush brush, float x, float y, StringFormat? format) =>
1636
/// <inheritdoc cref="DrawString(string?,
Font
, Brush, float, float, StringFormat?)"/>
1637
public void DrawString(ReadOnlySpan<char> s,
Font
font, Brush brush, float x, float y, StringFormat? format) =>
1643
/// <see cref="
Font
"/> objects using the formatting attributes of the specified <see cref="StringFormat"/>.
1646
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1656
public void DrawString(string? s,
Font
font, Brush brush, PointF point, StringFormat? format) =>
1660
/// <inheritdoc cref="DrawString(string?,
Font
, Brush, PointF, StringFormat?)"/>
1661
public void DrawString(ReadOnlySpan<char> s,
Font
font, Brush brush, PointF point, StringFormat? format) =>
1667
/// <see cref="
Font
"/> objects.
1670
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1681
/// <see cref="DrawString(string?,
Font
, Brush, RectangleF, StringFormat?)"/> overload that takes
1685
public void DrawString(string? s,
Font
font, Brush brush, RectangleF layoutRectangle) =>
1694
/// <see cref="DrawString(ReadOnlySpan{char},
Font
, Brush, RectangleF, StringFormat?)"/> overload that takes
1698
/// <inheritdoc cref="DrawString(string?,
Font
, Brush, RectangleF)"/>
1699
public void DrawString(ReadOnlySpan<char> s,
Font
font, Brush brush, RectangleF layoutRectangle) =>
1705
/// <see cref="
Font
"/> objects using the formatting attributes of the specified <see cref="StringFormat"/>.
1708
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1725
public void DrawString(string? s,
Font
font, Brush brush, RectangleF layoutRectangle, StringFormat? format) =>
1729
/// <inheritdoc cref="DrawString(string?,
Font
, Brush, RectangleF, StringFormat?)"/>
1730
public void DrawString(ReadOnlySpan<char> s,
Font
font, Brush brush, RectangleF layoutRectangle, StringFormat? format) =>
1734
private void DrawStringInternal(ReadOnlySpan<char> s,
Font
font, Brush brush, RectangleF layoutRectangle, StringFormat? format)
1763
/// <inheritdoc cref="MeasureString(string?,
Font
, SizeF, StringFormat?)"/>
1766
Font
font,
1774
/// <inheritdoc cref="MeasureString(string?,
Font
, SizeF, StringFormat?, out int, out int)"/>
1777
Font
font,
1787
Font
font,
1827
/// <inheritdoc cref="MeasureString(string?,
Font
, SizeF, StringFormat?)"/>
1828
public SizeF MeasureString(string? text,
Font
font, PointF origin, StringFormat? stringFormat)
1832
/// <inheritdoc cref="MeasureString(string?,
Font
, PointF, StringFormat?)"/>
1833
public SizeF MeasureString(ReadOnlySpan<char> text,
Font
font, PointF origin, StringFormat? stringFormat)
1837
/// <inheritdoc cref="MeasureString(string?,
Font
, SizeF, StringFormat?)"/>
1838
public SizeF MeasureString(string? text,
Font
font, SizeF layoutArea) => MeasureString(text, font, layoutArea, null);
1841
/// <inheritdoc cref="MeasureString(string?,
Font
, SizeF)"/>
1842
public SizeF MeasureString(ReadOnlySpan<char> text,
Font
font, SizeF layoutArea) => MeasureString(text, font, layoutArea, null);
1851
/// <inheritdoc cref="MeasureString(string?,
Font
, int, StringFormat?)"/>
1852
public SizeF MeasureString(string? text,
Font
font, SizeF layoutArea, StringFormat? stringFormat) =>
1856
/// <inheritdoc cref="MeasureString(string?,
Font
, SizeF, StringFormat?)"/>
1857
public SizeF MeasureString(ReadOnlySpan<char> text,
Font
font, SizeF layoutArea, StringFormat? stringFormat) =>
1862
/// Measures the specified text when drawn with the specified <see cref="
Font
"/>.
1865
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1873
/// The <see cref="MeasureString(string?,
Font
)"/> method is designed for use with individual strings and
1875
/// the <see cref="DrawString(string?,
Font
, Brush, PointF)"/> method adjusts glyph points to optimize display
1876
/// quality and might display a string narrower than reported by <see cref="MeasureString(string?,
Font
)"/>.
1878
/// use the <see cref="MeasureCharacterRanges(string?,
Font
, RectangleF, StringFormat?)"/> method or one of
1879
/// the <see cref="MeasureString(string?,
Font
, int, StringFormat?)"/> methods that takes a StringFormat, and
1885
public SizeF MeasureString(string? text,
Font
font) => MeasureString(text, font, new SizeF(0, 0));
1888
/// <inheritdoc cref="MeasureString(string?,
Font
)"/>
1889
public SizeF MeasureString(ReadOnlySpan<char> text,
Font
font) => MeasureString(text, font, new SizeF(0, 0));
1893
/// <inheritdoc cref="MeasureString(string?,
Font
)"/>
1894
public SizeF MeasureString(string? text,
Font
font, int width) => MeasureString(text, font, new SizeF(width, 999999));
1897
/// <inheritdoc cref="MeasureString(string?,
Font
, int)"/>
1898
public SizeF MeasureString(ReadOnlySpan<char> text,
Font
font, int width) =>
1905
/// <inheritdoc cref="MeasureString(string?,
Font
, int)"/>
1906
public SizeF MeasureString(string? text,
Font
font, int width, StringFormat? format) =>
1910
/// <inheritdoc cref="MeasureString(string?,
Font
, int, StringFormat?)"/>
1911
public SizeF MeasureString(ReadOnlySpan<char> text,
Font
font, int width, StringFormat? format) =>
1920
/// <param name="font"><see cref="
Font
"/> that defines the text format.</param>
1936
public Region[] MeasureCharacterRanges(string? text,
Font
font, RectangleF layoutRect, StringFormat? stringFormat) =>
1940
/// <inheritdoc cref="MeasureCharacterRanges(string?,
Font
, RectangleF, StringFormat?)"/>
1941
public Region[] MeasureCharacterRanges(ReadOnlySpan<char> text,
Font
font, RectangleF layoutRect, StringFormat? stringFormat) =>
1947
Font
font,
System\Drawing\PointerExtensions.cs (1)
26
public static GpFont* Pointer(this
Font
? font) => font is null ? null : font.NativeFont;
System\Drawing\SystemFonts.cs (25)
13
public static
Font
? GetFontByName(string systemFontName)
57
public static
Font
? CaptionFont
61
Font
? captionFont = null;
73
public static
Font
? SmallCaptionFont
77
Font
? smcaptionFont = null;
89
public static
Font
? MenuFont
93
Font
? menuFont = null;
105
public static
Font
? StatusFont
109
Font
? statusFont = null;
121
public static
Font
? MessageBoxFont
125
Font
? messageBoxFont = null;
147
public static unsafe
Font
? IconTitleFont
151
Font
? iconTitleFont = null;
164
public static
Font
DefaultFont
168
Font
? defaultFont = null;
186
using
Font
fontInWorldUnits =
Font
.FromHfont(handle);
222
public static
Font
DialogFont
226
Font
? dialogFont = null;
262
private static
Font
FontInPoints(
Font
font)
267
private static
Font
GetFontFromData(in LOGFONTW logFont) =>
270
private static
Font
GetFontFromData(in LOGFONT logFont)
272
Font
? font = null;
275
font =
Font
.FromLogFont(in logFont);
System\Drawing\Text\PrivateFontCollection.cs (1)
9
/// Encapsulates a collection of <see cref='
Font
'/> objects.
System.Windows.Forms (338)
System\Drawing\Design\UITypeEditor.cs (1)
55
[typeof(
Font
)] = $"System.Drawing.Design.FontEditor, {Assemblies.SystemDrawingDesign}",
System\Windows\Forms\ActiveX\AxHost.cs (10)
65
private static ConditionalWeakTable<
Font
, object>? s_fontTable;
339
public override
Font
Font
3596
private static FONTDESC GetFONTDESCFromFont(
Font
font)
3647
protected static object? GetIFontFromFont(
Font
? font)
3666
private protected static IFont* GetIFontPointerFromFont(
Font
? font)
3696
protected static
Font
? GetFontFromIFont(object? font)
3706
Font
f =
Font
.FromHfont(oleFont.hFont);
3721
protected static object? GetIFontDispFromFont(
Font
? font)
3746
protected static
Font
? GetFontFromIFontDisp(object? font)
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (3)
32
Font
font = (
Font
)obj;
61
return hr.Failed ? DefaultFont :
Font
.FromHfont(nativeFont.Value->hFont);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (5)
44
private
Font
? ActiveXAmbientFont
200
internal
Font
? AmbientFont
216
property.Value =
Font
.FromHfont(font.Value->hFont);
226
return (
Font
?)property.Value;
1376
prop.Value =
Font
.FromHfont(pQaContainer->pFont->hFont);
System\Windows\Forms\AmbientProperties.cs (1)
28
public
Font
? Font { get; set; }
System\Windows\Forms\Application.cs (7)
27
private static
Font
? s_defaultFont;
31
private static
Font
? s_defaultFontScaled;
384
internal static
Font
DefaultFont => s_defaultFontScaled ?? s_defaultFont!;
1382
/// Sets the default <see cref="
Font
"/> for the process.
1399
public static void SetDefaultFont(
Font
font)
1428
Font
newSystemFont = SystemFonts.GetFontByName(s_defaultFont.SystemFontName)!;
1441
Font
? font = ScaleHelper.ScaleToSystemTextSize(s_defaultFont);
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (6)
17
private
Font
? _lastFont;
21
public override Type ManagedType => typeof(
Font
);
53
using
Font
font =
Font
.FromHfont(_lastHandle);
77
_lastFont = (
Font
)managedValue;
106
private static void ApplyFontSettings(
Font
source, IFont* target, out bool targetChanged)
System\Windows\Forms\Control.cs (27)
176
private static
Font
? s_defaultFont;
281
private
Font
? _scaledControlFont;
289
private Dictionary<int,
Font
>? _dpiFonts;
1647
public static
Font
DefaultFont
1892
public virtual
Font
Font
1900
Font
? previous = Properties.GetValueOrDefault<
Font
>(s_fontProperty);
1908
Font
currentFont = Font;
1949
internal
Font
GetScaledFont(
Font
font, int newDpi, int oldDpi)
1955
_dpiFonts ??= new Dictionary<int,
Font
>
1960
if (_dpiFonts.TryGetValue(newDpi, out
Font
? scaledFont))
1980
foreach (
Font
font in _dpiFonts.Values)
2007
if (TryGetExplicitlySetFont(out
Font
? font))
2026
if (Properties.TryGetValue(s_currentAmbientFontProperty, out
Font
? currentAmbient) && currentAmbient == ambientFont)
2054
if (TryGetExplicitlySetFont(out
Font
? font))
2998
internal
Font
? ScaledControlFont
3036
Font
? oldFont = null;
4243
Font
oldFont = Font;
5556
private
Font
GetCurrentFontAndDpi(out int fontDpi)
5566
if (TryGetExplicitlySetFont(out
Font
? font))
7433
Font
localFont = GetCurrentFontAndDpi(out int fontDpi);
7445
Font
fontForDpi = GetScaledFont(localFont, DeviceDpiInternal, fontDpi);
10792
private protected bool TryGetExplicitlySetFont([NotNullWhen(true)] out
Font
? font) =>
10800
private protected void SetScaledFont(
Font
scaledFont, bool raiseOnFontChangedEvent = true)
11585
Font
localFont = GetCurrentFontAndDpi(out int fontDpi);
12633
Font
font = SystemFonts.MessageBoxFont!;
System\Windows\Forms\Control.FontHandleWrapper.cs (2)
11
/// Wrapper for a <see cref="Drawing.
Font
"/>'s <see cref="HFONT"/>.
17
internal FontHandleWrapper(
Font
font) => _handle = (HFONT)font.ToHfont();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
576
Font
font,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (1)
30
public
Font
Font { get; set; } = null!;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (1)
297
Font
font,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
154
Font
font,
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
135
Font
font,
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (11)
65
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/>
124
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/>
128
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/>
129
public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText,
Font
? font, bool focused, PushButtonState state)
141
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/>
142
public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText,
Font
? font, TextFormatFlags flags, bool focused, PushButtonState state)
170
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/>
197
/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/>
202
Font
? font,
224
Font
? font,
236
Font
? font,
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (9)
49
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/>
83
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/>
89
Font
? font,
101
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/>
107
Font
? font,
117
Font
? font,
155
/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/>
161
Font
? font,
185
Font
? font,
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (10)
49
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" />
87
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" />
93
Font
? font,
102
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" />
108
Font
? font,
121
Font
? font,
155
/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?,
Font
?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" />
161
Font
? font,
185
Font
? font,
208
Font
? font,
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (4)
62
public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText,
Font
? font, ComboBoxState state)
70
public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText,
Font
? font, Rectangle textBounds, ComboBoxState state)
78
public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText,
Font
? font, TextFormatFlags flags, ComboBoxState state)
90
public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText,
Font
? font, Rectangle textBounds, TextFormatFlags flags, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2623
public override
Font
Font
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
2511
Font
font,
2525
Font
font,
2550
Font
font,
2596
Font
font,
2616
Font
font,
3947
internal static bool TextFitsInBounds(Graphics graphics, string text,
Font
font, Size maxBounds, TextFormatFlags flags)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (3)
143
public
Font
? Font
145
get => Properties.GetValueOrDefault<
Font
>(s_propFont);
148
Font
? previous = Properties.AddOrRemoveValue(s_propFont, value);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
948
Font
? getLinkFont = null;
949
Font
? getHoverFont = null;
953
using
Font
linkFont = getLinkFont;
954
using
Font
hoverFont = getHoverFont;
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
318
Font
font)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (2)
95
private
Font
? _calendarFont;
205
public
Font
CalendarFont
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
22
private
Font
? _cachedFont;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (8)
77
public static void DrawGroupBox(Graphics g, Rectangle bounds, string? groupBoxText,
Font
? font, GroupBoxState state)
87
Font
? font,
99
Font
? font,
108
Font
? font,
129
Font
? font,
139
Font
? font,
170
Font
? font,
276
Font
? font,
System\Windows\Forms\Controls\Labels\LinkLabel.cs (6)
34
private
Font
? _linkFont;
35
private
Font
? _hoverLinkFont;
533
using
Font
alwaysUnderlined = new Font(Font, Font.Style | FontStyle.Underline);
1225
Font
linkFont,
1226
Font
hoverLinkFont,
1257
Font
font = (linkState & LinkState.Hover) == LinkState.Hover ? hoverLinkFont : linkFont;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (4)
163
Font
baseFont,
165
[AllowNull] ref
Font
linkFont,
166
[AllowNull] ref
Font
hoverLinkFont)
197
Font
f = baseFont;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
588
Font
font = Font;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
428
public override
Font
Font
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (2)
26
Font
? font)
76
public
Font
? Font { get; }
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (1)
138
Font
font = ItemIndex == -1 ? Item!.Font : SubItem!.Font;
System\Windows\Forms\Controls\ListView\ListView.cs (5)
108
private
Font
_odCacheFont;
2793
Font
? subItemFont = null;
6060
Font
font = GetListHeaderFont();
6374
private
Font
GetListHeaderFont()
6378
return
Font
.FromHfont(hFont);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (7)
106
public ListViewItem(string[]? items, int imageIndex, Color foreColor, Color backColor,
Font
? font)
162
public ListViewItem(string[]? items, int imageIndex, Color foreColor, Color backColor,
Font
? font, ListViewGroup? group)
197
public ListViewItem(string[]? items, string? imageKey, Color foreColor, Color backColor,
Font
? font)
235
public ListViewItem(string[]? items, string? imageKey, Color foreColor, Color backColor,
Font
? font, ListViewGroup? group)
388
public
Font
Font
1222
Font = (
Font
)info.GetValue(nameof(Font), typeof(
Font
))!;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (2)
46
public ListViewSubItem(ListViewItem? owner, string? text, Color foreColor, Color backColor,
Font
font)
141
public
Font
Font
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.SubItemStyle.cs (1)
16
public
Font
? font; // Do NOT rename (binary serialization).
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (2)
125
public ListViewSubItem Add(string? text, Color foreColor, Color backColor,
Font
font)
167
public void AddRange(string[] items, Color foreColor, Color backColor,
Font
font)
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (2)
90
typeof(
Font
)
110
typeof(
Font
)
System\Windows\Forms\Controls\ListView\ListViewSubItemConverter.cs (1)
41
typeof(
Font
)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
278
public override
Font
Font
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
200
public override
Font
Font
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (4)
15
public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text,
Font
font)
18
public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text,
Font
font, int width)
21
public static SizeF MeasureTextSimple(PropertyGrid owner, Graphics g, string? text,
Font
font, SizeF size)
31
public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text,
Font
font, SizeF size)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
117
Font
font = GetFont(boldFont: bold);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.CacheItems.cs (2)
13
public
Font
? LastLabelFont;
17
public
Font
? LastValueFont;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (4)
1178
protected int GetLabelTextWidth(string? text, Graphics graphics,
Font
font)
1201
public int GetValueTextWidth(string text, Graphics graphics,
Font
font)
1474
protected
Font
GetFont(bool boldFont)
1526
Font
font = GetFont(boldFont: bold);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
56
private
Font
? _boldFont;
1325
public
Font
GetBaseFont() => Font;
1327
public
Font
GetBoldFont() => _boldFont ??= new Font(Font, FontStyle.Bold);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (5)
389
public override
Font
Font
409
Font
? font = GetCharFormatFont(selectionOnly: false);
938
public
Font
? SelectionFont
2152
private
Font
? GetCharFormatFont(bool selectionOnly)
2714
private unsafe void SetCharFormatFont(bool selectionOnly,
Font
value)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
156
public override
Font
Font
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (5)
54
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText,
Font
? font, TabItemState state)
62
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText,
Font
? font, bool focused, TabItemState state)
72
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText,
Font
? font, TextFormatFlags flags, bool focused, TabItemState state)
111
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText,
Font
? font, Image image, Rectangle imageRectangle, bool focused, TabItemState state)
121
public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText,
Font
? font, TextFormatFlags flags, Image image, Rectangle imageRectangle, bool focused, TabItemState state)
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (4)
51
public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText,
Font
? font, TextBoxState state)
59
public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText,
Font
? font, Rectangle textBounds, TextBoxState state)
67
public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText,
Font
? font, TextFormatFlags flags, TextBoxState state)
78
public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText,
Font
? font, Rectangle textBounds, TextFormatFlags flags, TextBoxState state)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
62
private
Font
? _defaultFont;
516
public override
Font
Font
3747
if (item.TryGetExplicitlySetFont(out
Font
? local))
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
189
public override
Font
Font
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
355
public override
Font
Font
610
Font
originalFont = Font;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
787
Font
currentFont = childItem.Font;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (6)
145
internal
Font
_defaultFont = ToolStripManager.DefaultFont;
909
public virtual
Font
Font
913
if (TryGetExplicitlySetFont(out
Font
? font))
2325
private
Font
? GetOwnerFont() => Owner?.Font;
3191
Font
f = Font;
3632
internal bool TryGetExplicitlySetFont([NotNullWhen(true)] out
Font
? local) => Properties.TryGetValue(s_fontProperty, out local);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (3)
25
Font
? textFont,
48
Font
? textFont,
86
public
Font
? TextFont { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (3)
23
private
Font
? _hoverLinkFont;
24
private
Font
? _linkFont;
352
Font
font = Font;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (6)
23
private static
Font
? s_defaultFont;
24
private static readonly ConcurrentDictionary<int,
Font
> s_defaultFontCache = new();
50
internal static
Font
DefaultFont
59
Font
? sysFont;
66
if (!s_defaultFontCache.TryGetValue(dpi, out
Font
? retFont))
90
Font
? retFont = s_defaultFont;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
899
Font
? textFont = e.TextFont;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
105
public override
Font
Font
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
95
public override
Font
Font
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
216
public override
Font
Font
System\Windows\Forms\Controls\TreeView\TreeNode.cs (2)
729
public
Font
? NodeFont
742
Font
? oldfont = NodeFont;
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2827
Font
font = node.NodeFont ?? node.TreeView.Font;
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGrid.cs (2)
104
public
Font
CaptionFont
264
public
Font
HeaderFont
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTableStyle.cs (1)
140
public
Font
HeaderFont
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBar.cs (1)
71
public override Drawing.
Font
Font
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarDrawItemEventArgs.cs (2)
25
Font
font,
38
Font
font,
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1246
public override
Font
Font
System\Windows\Forms\Design\ComponentEditorForm.cs (2)
169
Font
? uiFont = DefaultFont;
172
uiFont = (
Font
?)uiService.Styles["DialogFont"];
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (5)
26
private
Font
? _font;
135
public
Font
Font
139
Font
? result = _font ?? Control.DefaultFont;
466
using
Font
fontInWorldUnits =
Font
.FromLogFont(in lf, dc);
System\Windows\Forms\Form.cs (2)
3776
public static SizeF GetAutoScaleSize(
Font
font)
4577
Font
fontForDpi = GetScaledFont(Font, deviceDpiNew, deviceDpiOld);
System\Windows\Forms\Help\Help.cs (1)
88
Font
font = SystemFonts.StatusFont ?? SystemFonts.DefaultFont;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1393
Font
fontForDpi = GetScaledFont(Font, deviceDpiNew, deviceDpiOld);
System\Windows\Forms\Layout\LayoutUtils.cs (1)
43
public static Size OldGetLargestStringSizeInCollection(
Font
? font, ICollection? objects)
System\Windows\Forms\Layout\LayoutUtils.MeasureTextCache.cs (3)
29
public Size GetTextSize(string? text,
Font
? font, Size proposedConstraints, TextFormatFlags flags)
99
public bool TextRequiresWordBreak(string? text,
Font
? font, Size size, TextFormatFlags flags)
108
private Size GetUnconstrainedSize(string? text,
Font
? font, TextFormatFlags flags)
System\Windows\Forms\OwnerDrawPropertyBag.cs (2)
22
if (entry.Name == nameof(Font) && entry.Value is
Font
font)
41
public
Font
? Font { get; set; }
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
637
public override
Font
Font
System\Windows\Forms\Rendering\ControlPaint.cs (5)
2007
Font
font,
2039
Font
font,
2056
Font
font,
2121
internal static
Font
FontInPoints(
Font
font)
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (5)
31
public DrawItemEventArgs(Graphics graphics,
Font
? font, Rectangle rect, int index, DrawItemState state)
41
Font
? font,
58
Font
? font,
67
Font
? font,
90
public
Font
? Font { get; }
System\Windows\Forms\Rendering\FontCache.cs (7)
9
/// Thread safe cache of <see cref="HFONT"/> objects created from <see cref="
Font
"/> objects.
22
internal sealed partial class FontCache : RefCountedCache<HFONT, FontCache.Data, (
Font
Font, FONT_QUALITY Quality)>
36
public CacheEntry GetEntry(
Font
font, FONT_QUALITY quality = FONT_QUALITY.DEFAULT_QUALITY) => GetEntry((font, quality));
38
public override CacheEntry GetEntry((
Font
Font, FONT_QUALITY Quality) key)
46
protected override CacheEntry CreateEntry((
Font
Font, FONT_QUALITY Quality) key, bool cached)
49
protected override bool IsMatch((
Font
Font, FONT_QUALITY Quality) key, CacheEntry entry)
50
=> entry.Data.Font.TryGetTarget(out
Font
? currentFont)
System\Windows\Forms\Rendering\FontCache.Data.cs (4)
18
public WeakReference<
Font
> Font { get; }
24
public Data(
Font
font, FONT_QUALITY quality)
26
Font = new WeakReference<
Font
>(font);
66
private static unsafe HFONT FromFont(
Font
font, FONT_QUALITY quality = FONT_QUALITY.DEFAULT_QUALITY)
System\Windows\Forms\Rendering\GdiCache.cs (1)
91
public static FontCache.Scope GetHFONTScope(
Font
? font, FONT_QUALITY quality = FONT_QUALITY.DEFAULT_QUALITY)
System\Windows\Forms\Rendering\TextRenderer.cs (55)
25
public static void DrawText(IDeviceContext dc, string? text,
Font
? font, Point pt, Color foreColor)
33
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
37
public static void DrawText(IDeviceContext dc, ReadOnlySpan<char> text,
Font
font, Point pt, Color foreColor)
43
Font
? font,
54
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
62
Font
font,
71
Font
? font,
83
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
94
Font
? font,
110
Font
? font,
123
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
135
Font
? font,
149
public static void DrawText(IDeviceContext dc, string? text,
Font
? font, Rectangle bounds, Color foreColor)
157
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
164
Font
? font,
172
Font
? font,
184
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
192
Font
? font,
201
Font
? font,
213
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
224
Font
? font,
240
Font
? font,
253
/// <param name="font">The <see cref="
Font
"/> to apply to the drawn text.</param>
265
Font
? font,
282
Font
? font,
292
Font
? font,
315
Font
? font,
324
Font
? font,
348
Font
? font,
358
Font
? font,
381
public static Size MeasureText(string? text,
Font
? font)
388
/// <param name="font">The <see cref="
Font
"/> to apply to the measured text.</param>
392
/// <see cref="DrawText(IDeviceContext, ReadOnlySpan{char},
Font
?, Rectangle, Color, TextFormatFlags)"/>
396
/// versions of <see cref="DrawText(IDeviceContext, ReadOnlySpan{char},
Font
, Point, Color)"/> and
397
/// <see cref="MeasureText(IDeviceContext, ReadOnlySpan{char},
Font
?)"/> that take a Size and
399
/// <see cref="MeasureText(IDeviceContext, string?,
Font
?, Size, TextFormatFlags)"/>.
401
public static Size MeasureText(ReadOnlySpan<char> text,
Font
? font)
404
public static Size MeasureText(string? text,
Font
? font, Size proposedSize)
412
/// <param name="font">The <see cref="
Font
"/> to apply to the measured text.</param>
418
public static Size MeasureText(ReadOnlySpan<char> text,
Font
? font, Size proposedSize)
421
public static Size MeasureText(string? text,
Font
? font, Size proposedSize, TextFormatFlags flags)
429
/// <param name="font">The <see cref="
Font
"/> to apply to the measured text.</param>
439
public static Size MeasureText(ReadOnlySpan<char> text,
Font
? font, Size proposedSize, TextFormatFlags flags)
442
public static Size MeasureText(IDeviceContext dc, string? text,
Font
? font)
456
public static Size MeasureText(IDeviceContext dc, ReadOnlySpan<char> text,
Font
? font)
459
public static Size MeasureText(IDeviceContext dc, string? text,
Font
? font, Size proposedSize)
468
/// <param name="font">The <see cref="
Font
"/> to apply to the measured text.</param>
475
public static Size MeasureText(IDeviceContext dc, ReadOnlySpan<char> text,
Font
? font, Size proposedSize)
481
Font
? font,
492
/// <param name="font">The <see cref="
Font
"/> to apply to the measured text.</param>
506
Font
? font,
513
Font
? font,
529
Font
? font,
650
/// <inheritdoc cref="GdiCache.GetHFONTScope(
Font
?, FONT_QUALITY)"/>
658
private static FontCache.Scope GetFontOrHdcHFONT(
Font
? font, FONT_QUALITY quality, HDC hdc)
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
163
public override
Font
Font
System\Windows\Forms\SystemInformation.cs (4)
134
public static
Font
MenuFont => GetMenuFontHelper(0, useDpi: false);
139
public static
Font
GetMenuFontForDpi(int dpi)
142
private static unsafe
Font
GetMenuFontHelper(uint dpi, bool useDpi)
156
return
Font
.FromLogFont(Unsafe.AsRef<LOGFONT>((LOGFONT*)&data.lfMenuFont));
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (2)
27
Font
? font)
67
public
Font
? Font { get; }
System\Windows\Forms\ToolTip\ToolTip.cs (2)
2322
Font
font;
2325
font =
Font
.FromHfont(PInvokeCore.SendMessage(this, PInvokeCore.WM_GETFONT));
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (2)
530
public
Font
? GetFont(IDeviceContext dc, FontProperty prop)
547
return
Font
.FromLogFont(logfont);
System.Windows.Forms.Design (37)
System\ComponentModel\Design\ByteViewer.cs (5)
37
private static readonly
Font
s_addressFont = new("Microsoft Sans Serif", 8.0f);
38
private static readonly
Font
s_hexDumpFont = new("Courier New", 8.0f);
124
Font
font = s_addressFont;
193
Font
font = s_hexDumpFont;
205
Font
font = s_hexDumpFont;
System\ComponentModel\Design\DesignerActionPanel.cs (1)
65
Font = (
Font
)uiService.Styles["DialogFont"]!;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
444
public DropDownHolder(Control hostedControl, Control parentControl, Color borderColor,
Font
font, EditorPropertyLine parent)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
18
public FlyoutDialog(Control hostedControl, Control parentControl, Color borderColor,
Font
font)
System\ComponentModel\Design\DesignerActionPanel.HeaderLine.cs (1)
16
protected override
Font
GetFont() => new(ActionPanel.Font, FontStyle.Bold);
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (1)
58
protected virtual
Font
GetFont()
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (3)
22
private readonly Dictionary<int,
Font
?> _fallbackFonts;
250
public override
Font
Font
295
if (!_fallbackFonts.TryGetValue(planeNumber, out
Font
? replaceFont))
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
259
Font
font = Font;
System\Drawing\Design\CursorEditor.CursorUI.cs (1)
68
Font
font = e.Font!;
System\Drawing\Design\FontEditor.cs (1)
33
if (value is
Font
fontValue)
System\Drawing\Design\FontNameEditor.cs (1)
72
using
Font
font = new(fontFamily, fontSize, fontStyle, GraphicsUnit.Pixel);
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
125
_selectionMenuItem.DropDown.Font = (
Font
)uis.Styles["DialogFont"]!;
239
Font = (
Font
)uis.Styles["DialogFont"]!;
System\Windows\Forms\Design\ComponentTray.cs (3)
154
Font = (
Font
)uiService.Styles["DialogFont"];
1410
Font = (
Font
)uiService.Styles["DialogFont"];
1943
public override
Font
Font
System\Windows\Forms\Design\ControlDesigner.cs (1)
2273
using (
Font
errorFont = new(
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (2)
55
Font
uiFont = DefaultFont;
58
uiFont = (
Font
)uiService.Styles["DialogFont"]!;
System\Windows\Forms\Design\DataGridViewCellStyleEditor.cs (1)
30
_builderDialog.Font = (
Font
)uiService.Styles["DialogFont"]!;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
794
if (font is not
Font
uiFont)
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
191
using
Font
drawFont = new("Arial", 8);
System\Windows\Forms\Design\TabOrder.cs (3)
26
private readonly
Font
_tabFont;
48
_tabFont = uisvc is not null && uisvc.Styles["DialogFont"] is
Font
dialogFont ? dialogFont : DefaultFont;
191
Font
font = _tabFont;
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (2)
636
Font
measureFont = Font;
864
using
Font
boldFont = new(_selectedItemName.Font, FontStyle.Bold);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
393
contextMenu.Font = (
Font
)uis.Styles["DialogFont"];
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (3)
82
item.DropDown.Font = (
Font
)uis.Styles["DialogFont"];
172
Font
font = (
Font
)uis.Styles["DialogFont"];
System.Windows.Forms.Primitives (9)
System\Drawing\FontExtensions.cs (2)
11
public static LOGFONTW ToLogicalFont(this
Font
font)
17
public static LOGFONTW ToLogicalFont(this
Font
font, Graphics graphics)
System\Windows\Forms\FontExtensions.cs (3)
16
/// A new <see cref="
Font
"/> object with the new size, or <see langword="null"/> if <paramref name="templateFont"/>
20
public static
Font
? WithSize(this
Font
? templateFont, float emSize) => templateFont is null
System\Windows\Forms\Internals\ScaleHelper.cs (3)
220
/// Creates a scaled version of the given non system <see cref="
Font
"/> to the Windows Accessibility Text Size setting (also
223
internal static
Font
? ScaleToSystemTextSize(
Font
? font)
System\Windows\Forms\SystemDrawingExtensions.cs (1)
14
internal static HFONT ToHFONT(this
Font
font) => (HFONT)font.ToHfont();
WindowsFormsIntegration (5)
System\Windows\Integration\Convert.cs (3)
208
internal static double SystemDrawingFontToSystemWindowsFontSize(SD.
Font
font)
224
internal static FontWeight ToSystemWindowsFontWeight(SD.
Font
sdFont)
229
internal static FontStyle ToSystemWindowsFontStyle(SD.
Font
sdFont)
System\Windows\Integration\ElementHostPropertyMap.cs (2)
126
SD.
Font
wfFont = value as SD.
Font
;