6 instantiations of Scope
System.Windows.Forms (2)
System\Windows\Forms\Rendering\GdiCache.cs (1)
95
return font is null ? new FontCache.
Scope
() : s_fontCache.GetEntry(font, quality).CreateScope();
System\Windows\Forms\Rendering\TextRenderer.cs (1)
667
return new FontCache.
Scope
(hfont);
System.Windows.Forms.Primitives (4)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (3)
37
return new PenCache.
Scope
(pen);
54
return new SolidBrushCache.
Scope
(solidBrush);
77
=> width == 1 ? GetPenScope(color) : new PenCache.
Scope
(new Pen(color, width));
System\Windows\Forms\RefCountedCache.CacheEntry.cs (1)
64
public Scope CreateScope() =>
new
(this);
218 references to Scope
System.Windows.Forms (190)
System\Windows\Forms\Control.cs (1)
8204
using
var
brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (5)
341
using
var
brush = color.GetCachedSolidBrushScope();
439
using
var
pen = color.GetCachedPenScope();
474
using
var
highlightBrush = colors.Highlight.GetCachedSolidBrushScope();
479
using
var
shadowBrush = colors.ButtonShadow.GetCachedSolidBrushScope();
484
using
var
brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (3)
89
using
var
windowFrame = colors.WindowFrame.GetCachedPenScope();
90
using
var
highlight = colors.Highlight.GetCachedPenScope();
91
using
var
buttonShadow = colors.ButtonShadow.GetCachedPenScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
77
using
var
brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (1)
29
using
var
back = GetBackgroundColor(state, isDefault).GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (1)
55
using
var
brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (4)
44
using
var
brush = backColor.GetCachedSolidBrushScope();
67
using
var
focusPen = Color.White.GetCachedPenScope(FocusedButtonBorderThickness);
179
using
var
topLeftPen = topLeftColor.GetCachedPenScope(borderThickness);
183
using
var
bottomRightPen = bottomRightColor.GetCachedPenScope(borderThickness);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (4)
40
using
var
fieldBrush = field.GetCachedSolidBrushScope();
41
using
var
dark = colors.ButtonShadow.GetCachedPenScope();
42
using
var
light = colors.ButtonFace.GetCachedPenScope();
43
using
var
lightLight = colors.Highlight.GetCachedPenScope();
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
818
using (
var
hfont = GdiCache.GetHFONTScope(Font))
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (4)
85
using
var
b = innerBorderColor.GetCachedSolidBrushScope();
91
using
var
outerBorderPen = outerBorderColor.GetCachedPenScope();
107
using
var
innerBorderPen = innerBorderColor.GetCachedPenScope();
117
using
var
borderPen = borderPenColor.GetCachedPenScope();
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
5672
using
var
brush = SystemColors.HotTrack.GetCachedSolidBrushScope();
19226
using
var
brush = BackgroundColor.GetCachedSolidBrushScope();
19270
using
var
brush = BackgroundColor.GetCachedSolidBrushScope();
19316
using
var
pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
19326
using
var
pen = SystemColors.ControlText.GetCachedPenScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
689
using
var
backBrush = backBrushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
3139
using
var
penBackColor = cellStyle.BackColor.GetCachedPenScope();
3140
using
var
penGridColor = DataGridView.GridPenColor.GetCachedPenScope();
3143
using
var
penControlDark = darkColor.GetCachedPenScope();
3144
using
var
penControlLightLight = lightColor.GetCachedPenScope();
3161
using
var
dividerWidthBrush = dividerWidthColor.GetCachedSolidBrushScope();
3196
using
var
dividerHeightColorBrush = dividerHeightColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
1124
using
var
brush = brushColor.GetCachedSolidBrushScope();
1320
using
var
pen = foreBrushColor.GetCachedPenScope();
1337
using
var
highBrush = highlight.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
872
using
var
brush = brushColor.GetCachedSolidBrushScope();
1005
using
var
penControlDark = darkColor.GetCachedPenScope();
1006
using
var
penControlLightLight = lightColor.GetCachedPenScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1927
using
var
brush = paint && !brushColor.HasTransparency() ? brushColor.GetCachedSolidBrushScope() : default;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
549
using
var
brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
780
using
var
brush = paint ? brushColor.GetCachedSolidBrushScope() : default;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
916
using
var
brush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
741
using
var
brush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
689
using
var
brush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (4)
270
using
var
brush = brushColor.GetCachedSolidBrushScope();
377
using
var
penControlDark = darkColor.GetCachedPenScope();
383
using
var
penControlLightLight = lightColor.GetCachedPenScope();
389
using
var
penControlDark = darkColor.GetCachedPenScope();
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
473
using
var
textBrush = ForeColor.GetCachedSolidBrushScope();
514
using
var
hfont = GdiCache.GetHFONTScope(Font);
561
using
var
boxPen = boxColor.GetCachedPenScope();
669
using
var
brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
249
using
var
light = ControlPaint.Light(backColor, 1.0f).GetCachedPenScope();
250
using
var
dark = ControlPaint.Dark(backColor, 0f).GetCachedPenScope();
System\Windows\Forms\Controls\Labels\Label.cs (3)
1065
using
var
hfont = GdiCache.GetHFONTScope(Font);
1123
using
var
hfont = GdiCache.GetHFONTScope(Font);
1285
using
var
brush = color.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\Labels\LinkLabel.cs (4)
574
using
var
hfont = GdiCache.GetHFONTScope(Font);
1010
using
var
foreBrush = ForeColor.GetCachedSolidBrushScope();
1011
using
var
linkBrush = LinkColor.GetCachedSolidBrushScope();
1292
using
var
useBrush = brushColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (3)
622
using
var
brush = backColor.GetCachedSolidBrushScope();
681
using
var
brush = foreColor.GetCachedSolidBrushScope();
740
using
var
brush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2328
using
var
pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (1)
95
using (
var
backBrush = BackColor.GetCachedSolidBrushScope())
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
65
using
var
backBrush = Item.BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (1)
97
using
var
backBrush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6974
using
var
pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1193
using (
var
hfont = GdiCache.GetHFONTScope(Font))
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2891
using
var
backgroundBrush = BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
44
using
var
borderPen = BorderColor.GetCachedPenScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
136
using
var
topLinePen = OwnerGrid.CategorySplitterColor.GetCachedPenScope();
153
using
var
topLinePen = OwnerGrid.CategorySplitterColor.GetCachedPenScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (9)
1536
using
var
backBrush = backColor.GetCachedSolidBrushScope();
1546
using
var
linePen = ownerGrid.LineColor.GetCachedPenScope();
1559
using
var
stripeBrush = ownerGrid.LineColor.GetCachedSolidBrushScope();
1564
using
var
focusBrush = ownerGrid.SelectedItemWithFocusBackColor.GetCachedSolidBrushScope();
1593
using
var
textBrush = textColor.GetCachedSolidBrushScope();
1673
using
var
brush = textColor.GetCachedSolidBrushScope();
1744
using
var
brush = BackgroundColor.GetCachedSolidBrushScope();
1749
using
var
pen = penColor.GetCachedPenScope();
1832
using
var
backBrush = backColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (5)
2365
using
var
brush = color.GetCachedSolidBrushScope();
3316
using
var
splitterPen = OwnerGrid.LineColor.GetCachedPenScope(SplitterWidth);
3320
using
var
linePen = g.FindNearestColor(OwnerGrid.LineColor).GetCachedPenScope();
3367
using
var
backBrush = BackColor.GetCachedSolidBrushScope();
3372
using
var
borderPen = OwnerGrid.ViewBorderColor.GetCachedPenScope();
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2891
using
var
pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
827
using
var
pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
102
using
var
b = colorTable.ComboBoxButtonOnOverflow.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (33)
301
using
var
brush = Application.IsDarkModeEnabled ?
373
using
var
pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope();
387
using
var
pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope();
420
using (
var
pen = ColorTable.ToolStripBorder.GetCachedPenScope())
523
using
var
gripLightBrush = ColorTable.GripLight.GetCachedSolidBrushScope();
531
using
var
controlTextBrush = SystemColors.ControlText.GetCachedSolidBrushScope();
587
using
var
pen = borderColor.GetCachedPenScope();
606
using
var
brush = item.BackColor.GetCachedSolidBrushScope();
644
using
var
pen = borderColor.GetCachedPenScope();
657
using
var
brush = item.BackColor.GetCachedSolidBrushScope();
662
using
var
pen = ColorTable.MenuItemBorder.GetCachedPenScope();
931
using (
var
brush = overflowBottomLeftShadow.GetCachedSolidBrushScope())
937
using (
var
brush = overflowTopShadow.GetCachedSolidBrushScope())
987
using (
var
brush = middleColor.GetCachedSolidBrushScope())
1058
using
var
brush = fill.GetCachedSolidBrushScope();
1061
using
var
pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope();
1095
using
var
pen = ColorTable.MenuBorder.GetCachedPenScope();
1133
using
var
brush = beginColor.GetCachedSolidBrushScope();
1185
using
var
brush = ColorTable.ToolStripDropDownBackground.GetCachedSolidBrushScope();
1197
using (
var
pen = ColorTable.MenuBorder.GetCachedPenScope())
1205
using
var
brush = ColorTable.ToolStripDropDownBackground.GetCachedSolidBrushScope();
1269
using
var
pen = overflowBottomLeftShadow.GetCachedPenScope();
1294
using (
var
brush = overflowTopShadow.GetCachedSolidBrushScope())
1317
using (
var
brush = overflowButtonGradientBegin.GetCachedSolidBrushScope())
1351
using (
var
brush = ColorTable.ToolStripGradientMiddle.GetCachedSolidBrushScope())
1385
using (
var
brush = ColorTable.ToolStripGradientEnd.GetCachedSolidBrushScope())
1423
using
var
brush = ColorTable.ButtonSelectedHighlight.GetCachedSolidBrushScope();
1447
using
var
brush = ColorTable.ButtonCheckedHighlight.GetCachedSolidBrushScope();
1495
using
var
foreColorPen = ColorTable.SeparatorDark.GetCachedPenScope();
1496
using
var
highlightColorPen = ColorTable.SeparatorLight.GetCachedPenScope();
1558
using
var
brush = ColorTable.ButtonPressedHighlight.GetCachedSolidBrushScope();
1589
using
var
brush = item.BackColor.GetCachedSolidBrushScope();
1595
using
var
pen = ColorTable.ButtonSelectedBorder.GetCachedPenScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
695
using
var
brush = arrowColor.GetCachedSolidBrushScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (22)
74
private static SolidBrushCache.
Scope
GetDarkModeBrush(Color color) =>
82
private static PenCache.
Scope
GetDarkModePen(Color color) =>
106
using
var
brush = GetDarkModeBrush(backColor);
184
using
var
borderPen = GetDarkModePen(SystemColors.ControlDark);
215
using
var
borderPen = GetDarkModePen(SystemColors.ControlDark);
239
using
var
highlightBrush = GetDarkModeBrush(SystemColors.Highlight);
291
using
var
fillColor = isPressed
326
using
var
fillColor = splitButton.Pressed
335
using
var
linePen = GetDarkModePen(SystemColors.ControlDark);
377
using
var
leftPen = GetDarkModeColor(SystemColors.ControlDark).GetCachedPenScope();
382
using
var
rightPen = GetDarkModeColor(SystemColors.ButtonShadow).GetCachedPenScope();
387
using
var
leftPen = GetDarkModeColor(SystemColors.ButtonShadow).GetCachedPenScope();
392
using
var
rightPen = GetDarkModeColor(SystemColors.ControlDark).GetCachedPenScope();
406
using
var
foreColorPen = GetDarkModeColor(SystemColors.ControlDark).GetCachedPenScope();
411
using
var
darkModePen = GetDarkModeColor(SystemColors.ButtonShadow).GetCachedPenScope();
434
using
var
fillBrush = item.Pressed
469
using
var
arrowBrush = GetDarkModeColor(
521
using
var
darkColorBrush = GetDarkModeColor(SystemColors.ControlDark).GetCachedSolidBrushScope();
522
using
var
lightColorBrush = GetDarkModeColor(SystemColors.ControlLight).GetCachedSolidBrushScope();
582
using
var
marginColorBrush = GetDarkModeBrush(SystemColors.ControlLight);
650
using
var
highLightBrush = GetDarkModeBrush(SystemColors.GrayText);
651
using
var
shadowBrush = GetDarkModeBrush(SystemColors.ButtonShadow);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (4)
113
using
var
backBrush = backColor.GetCachedSolidBrushScope();
521
using
var
pen = borderColor.GetCachedPenScope();
646
using
var
brush = SystemColors.Highlight.GetCachedSolidBrushScope();
765
using
var
foreColorPen = item.ForeColor.GetCachedPenScope();
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
257
using
var
brush = innerBorderColor.GetCachedSolidBrushScope();
264
using
var
pen = outerBorderColor.GetCachedPenScope();
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2852
using
var
brush = BackColor.GetCachedSolidBrushScope();
3152
using
var
pen = VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
1030
using
var
brush = BackColor.GetCachedSolidBrushScope();
1561
using
var
solidBrush = BackColor.GetCachedSolidBrushScope();
System\Windows\Forms\Printing\PrintPreviewControl.cs (3)
346
using
var
backBrush = backColor.GetCachedSolidBrushScope();
601
using
var
brush = brushColor.GetCachedSolidBrushScope();
687
using (
var
brush = ForeColor.GetCachedSolidBrushScope())
System\Windows\Forms\Rendering\ControlPaint.cs (15)
222
using
var
brush = background.GetCachedSolidBrushScope();
456
using (
var
brush = backColor.GetCachedSolidBrushScope())
1062
using
var
darkPen = hls.Darker(1.0f).GetCachedPenScope();
1067
using
var
lightPen = hls.Lighter(1.0f).GetCachedPenScope();
1076
using
var
mediumPen = hls.Lighter(0.5f).GetCachedPenScope();
1101
using
var
lightPen = (stockColor ? SystemColors.ControlLightLight : hls.Lighter(1.0f)).GetCachedPenScope();
1106
using
var
darkPen = (stockColor ? SystemColors.ControlDarkDark : hls.Darker(1.0f)).GetCachedPenScope();
1116
using
var
topLeftPen = (!stockColor
1126
using
var
bottomRightPen = (stockColor ? SystemColors.ControlDark : hls.Darker(0.5f)).GetCachedPenScope();
1155
using
var
pen = color.GetCachedPenScope();
1893
using
var
bright = GdiPlusCache.GetCachedPenScope(LightLight(backColor));
1894
using
var
dark = GdiPlusCache.GetCachedPenScope(Dark(backColor));
1959
using
var
lightBrush = LightLight(color).GetCachedSolidBrushScope();
1963
using
var
darkBrush = Dark(color).GetCachedSolidBrushScope();
2021
using
var
borderPen = VisualStyles.VisualStyleInformation.TextControlBorder.GetCachedPenScope();
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
125
using
var
backBrush = BackColor.GetCachedSolidBrushScope();
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\TextExtensions.cs (3)
52
FontCache.
Scope
font,
104
this FontCache.
Scope
font,
213
FontCache.
Scope
font,
System\Windows\Forms\Rendering\TextRenderer.cs (4)
365
using
var
hfont = GetFontOrHdcHFONT(font, fontQuality, hdc);
521
using
var
hfont = GetFontOrHdcHFONT(font, FONT_QUALITY.DEFAULT_QUALITY, screen);
544
using
var
hfont = GetFontOrHdcHFONT(font, quality, hdc);
658
private static FontCache.
Scope
GetFontOrHdcHFONT(Font? font, FONT_QUALITY quality, HDC hdc)
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (1)
74
using
var
backBrush = _backColor.GetCachedSolidBrushScope();
System.Windows.Forms.Design (4)
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
360
using
var
brush = BackColor.GetCachedSolidBrushScope();
416
using
var
brush = color.GetCachedSolidBrushScope();
System\Drawing\Design\ColorEditor.cs (1)
51
using
var
brush = color.GetCachedSolidBrushScope();
System\Drawing\Design\CursorEditor.CursorUI.cs (1)
66
using
var
brushText = e.ForeColor.GetCachedSolidBrushScope();
System.Windows.Forms.Primitives (9)
System\Windows\Forms\GdiPlus\GdiPlusCache.cs (5)
27
private static PenCache.
Scope
GetPenScope(Color color)
44
private static SolidBrushCache.
Scope
GetSolidBrushScope(Color color)
73
internal static PenCache.
Scope
GetCachedPenScope(this Color color) => GetPenScope(color);
76
internal static PenCache.
Scope
GetCachedPenScope(this Color color, int width)
80
internal static SolidBrushCache.
Scope
GetCachedSolidBrushScope(this Color color) => GetSolidBrushScope(color);
System\Windows\Forms\RefCountedCache.CacheEntry.cs (1)
64
public
Scope
CreateScope() => new(this);
System\Windows\Forms\RefCountedCache.cs (2)
9
/// Cache that ref counts handed-out objects via "scopes" <see cref="
Scope
"/>.
13
/// type you would use here. <see cref="
Scope
"/> is implicitly convertible to this type.
System\Windows\Forms\RefCountedCache.Scope.cs (1)
60
public static implicit operator TObject(in
Scope
scope)
System.Windows.Forms.Primitives.Tests (10)
System\Windows\Forms\RefCacheTests.cs (10)
14
var
firstScope = cache.GetEntry(1).CreateScope();
17
var
secondScope = cache.GetEntry(1).CreateScope();
26
using
var
thirdScope = cache.GetEntry(1).CreateScope();
37
var
firstScope = cache.GetEntry(1).CreateScope();
38
var
secondScope = cache.GetEntry(2).CreateScope();
39
var
thirdScope = cache.GetEntry(3).CreateScope();
40
var
fourthScope = cache.GetEntry(4).CreateScope();
47
var
fifthScope = cache.GetEntry(5).CreateScope();
48
var
sixthScope = cache.GetEntry(5).CreateScope();
69
using
var
seventhScope = cache.GetEntry(7).CreateScope();
System.Windows.Forms.Tests (5)
Text\FontMetrics.cs (5)
27
using
var
hfont = GdiCache.GetHFONTScope(font, FONT_QUALITY.CLEARTYPE_QUALITY);
46
using
var
hfont = GdiCache.GetHFONTScope(font, FONT_QUALITY.CLEARTYPE_QUALITY);
67
using
var
hfont = GdiCache.GetHFONTScope(font, FONT_QUALITY.CLEARTYPE_QUALITY);
85
using
var
hfont = GdiCache.GetHFONTScope(font, FONT_QUALITY.CLEARTYPE_QUALITY);
142
using
var
hfont = GdiCache.GetHFONTScope(font, FONT_QUALITY.CLEARTYPE_QUALITY);