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