37 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.Windows.Forms (18)
System\Windows\Forms\ActiveX\AxHost.cs (2)
3721: new(f.Name, f.SizeInPoints, f.Style, GraphicsUnit.Point, f.GdiCharSet, f.GdiVerticalFont); 3807return new Font(
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (2)
571return new Font( 581return 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)
545using Font alwaysUnderlined = new Font(Font, Font.Style | FontStyle.Underline);
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (3)
227hoverLinkFont = new Font(f, style); 242hoverLinkFont = new Font(f, hoverStyle); 254linkFont = 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)
1333public Font GetBoldFont() => _boldFont ??= new Font(Font, FontStyle.Bold);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2231return 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);
398 references to 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.Windows.Forms (345)
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 3602private static FONTDESC GetFONTDESCFromFont(Font font) 3653protected static object? GetIFontFromFont(Font? font) 3678private protected static IFont* GetIFontPointerFromFont(Font? font) 3708protected static Font? GetFontFromIFont(object? font) 3718Font f = Font.FromHfont(oleFont.hFont); 3733protected static object? GetIFontDispFromFont(Font? font) 3761protected 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; 458internal static Font DefaultFont => s_defaultFontScaled ?? s_defaultFont!; 1536/// Sets the default <see cref="Font"/> for the process. 1553public static void SetDefaultFont(Font font) 1582Font newSystemFont = SystemFonts.GetFontByName(s_defaultFont.SystemFontName)!; 1595Font? 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)
178private static Font? s_defaultFont; 291private Font? _scaledControlFont; 299private Dictionary<int, Font>? _dpiFonts; 1835public static Font DefaultFont 2080public virtual Font Font 2088Font? previous = Properties.GetValueOrDefault<Font>(s_fontProperty); 2096Font currentFont = Font; 2137internal Font GetScaledFont(Font font, int newDpi, int oldDpi) 2143_dpiFonts ??= new Dictionary<int, Font> 2148if (_dpiFonts.TryGetValue(newDpi, out Font? scaledFont)) 2168foreach (Font font in _dpiFonts.Values) 2195if (TryGetExplicitlySetFont(out Font? font)) 2214if (Properties.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont) 2242if (TryGetExplicitlySetFont(out Font? font)) 3186internal Font? ScaledControlFont 3224Font? oldFont = null; 4462Font oldFont = Font; 5789private Font GetCurrentFontAndDpi(out int fontDpi) 5799if (TryGetExplicitlySetFont(out Font? font)) 8099Font localFont = GetCurrentFontAndDpi(out int fontDpi); 8111Font fontForDpi = GetScaledFont(localFont, DeviceDpiInternal, fontDpi); 11579private protected bool TryGetExplicitlySetFont([NotNullWhen(true)] out Font? font) => 11587private protected void SetScaledFont(Font scaledFont, bool raiseOnFontChangedEvent = true) 12372Font localFont = GetCurrentFontAndDpi(out int fontDpi); 13420Font 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)
675Font font,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (1)
36public 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)
157Font 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)
2628public override Font Font
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
2523Font font, 2537Font font, 2562Font font, 2608Font font, 2628Font font, 3959internal static bool TextFitsInBounds(Graphics graphics, string text, Font font, Size maxBounds, TextFormatFlags flags)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (3)
145public Font? Font 147get => Properties.GetValueOrDefault<Font>(s_propFont); 150Font? previous = Properties.AddOrRemoveValue(s_propFont, value);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
978Font? getLinkFont = null; 979Font? getHoverFont = null; 983using Font linkFont = getLinkFont; 984using 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\GroupBox.Modern.cs (5)
20private Font? _modernCaptionFont; 21private Font? _modernCaptionSourceFont; 30private Font ModernCaptionFont 151Font font = ModernCaptionFont; 558private Font CreateModernCaptionFont(float textScale)
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; 545using Font alwaysUnderlined = new Font(Font, Font.Style | FontStyle.Underline); 1237Font linkFont, 1238Font hoverLinkFont, 1269Font font = (linkState & LinkState.Hover) == LinkState.Hover ? hoverLinkFont : linkFont;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (4)
178Font baseFont, 180[AllowNull] ref Font linkFont, 181[AllowNull] ref Font hoverLinkFont) 212Font 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; 6077Font font = GetListHeaderFont(); 6391private Font GetListHeaderFont() 6395return 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; 1331public Font GetBaseFont() => Font; 1333public Font GetBoldFont() => _boldFont ??= new Font(Font, FontStyle.Bold);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (5)
418public override Font Font 438Font? font = GetCharFormatFont(selectionOnly: false); 974public Font? SelectionFont 2188private Font? GetCharFormatFont(bool selectionOnly) 2817private 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)
67private Font? _defaultFont; 521public override Font Font 3752if (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)
789Font 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)
922Font? 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)
2848Font 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)
1253public 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)
3779public static SizeF GetAutoScaleSize(Font font) 4593Font 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 (3)
15private Font? _font; 23if (entry.Name == nameof(Font) && entry.Value is Font font) 42public Font? Font
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
637public override Font Font
System\Windows\Forms\Rendering\Button\PopupButtonRenderContext.cs (1)
33public required Font Font { get; init; }
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)
2326Font font; 2329font = 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)
71Font 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)
226/// Creates a scaled version of the given non system <see cref="Font"/> to the Windows Accessibility Text Size setting (also 229internal 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;