Add kPrintWithPostScriptType42Fonts feature.
Add an off by default base::Feature for controlling whether PostScript
printing generates Type 42 fonts on Windows. This will speed up printing
for some printers that support PostScript level 3 and have a TrueType
rasterizer. Since this feature is experimental, having a base::Feature
toggle will allow the feature to be rolled out in a controlled manner.
This CL includes:
- Plumbing for the browser to tell the PdfToEmfConverter service to use
the new printing mode.
- New Printing.ConversionSize metrics to see how the new printing modes
perform size-wise.
- A very basic sanity test.
- Control for the feature in chrome://flags.
- Control for the feature via an enterprise policy.
Also fix another Windows-only printing enterprise policy to use
"MS_WIN_NAME" when referring to Windows.
Bug: 1232526
Change-Id: I4f3a333e6c83fb56d4482c8aa3af4fcc6b8533dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3150776
Reviewed-by: Julian Pastarmov <[email protected]>
Reviewed-by: Zentaro Kavanagh <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Alan Screen <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#919845}
diff --git a/printing/printing_features.cc b/printing/printing_features.cc
index d62c93f..4f28818 100644
--- a/printing/printing_features.cc
+++ b/printing/printing_features.cc
@@ -22,6 +22,11 @@
#endif // defined(OS_MAC)
#if defined(OS_WIN)
+// When using PostScript level 3 printing, render text with Type 42 fonts if
+// possible.
+const base::Feature kPrintWithPostScriptType42Fonts{
+ "PrintWithPostScriptType42Fonts", base::FEATURE_DISABLED_BY_DEFAULT};
+
// When using GDI printing, avoid rasterization if possible.
const base::Feature kPrintWithReducedRasterization{
"PrintWithReducedRasterization", base::FEATURE_DISABLED_BY_DEFAULT};