Bug 713680 - Change default Windows monospace font from Courier New to Consolas. r=jfkthame r=masayuki
MozReview-Commit-ID: 6WPOOCcF43M
--- a/devtools/client/shared/test/helper_inplace_editor.js
+++ b/devtools/client/shared/test/helper_inplace_editor.js
@@ -47,17 +47,17 @@ function createSpan(doc) {
info("Creating a new span element");
let div = doc.createElementNS(HTML_NS, "div");
let span = doc.createElementNS(HTML_NS, "span");
span.setAttribute("tabindex", "0");
span.style.fontSize = "11px";
span.style.display = "inline-block";
span.style.width = "100px";
span.style.border = "1px solid red";
- span.style.fontFamily = "monospace";
+ span.style.fontFamily = "Courier New";
div.style.height = "100%";
div.style.position = "absolute";
div.appendChild(span);
let parent = doc.querySelector("window") || doc.body;
parent.appendChild(div);
return span;
--- a/dom/events/test/test_continuous_wheel_events.html
+++ b/dom/events/test/test_continuous_wheel_events.html
@@ -4,17 +4,17 @@
<title>Test for D3E WheelEvent</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
-<div id="scrollable" style="font-family:monospace; font-size: 18px; line-height: 1; overflow: auto; width: 200px; height: 200px;">
+<div id="scrollable" style="font-family:'Courier New'; font-size: 18px; line-height: 1; overflow: auto; width: 200px; height: 200px;">
<div id="scrolled" style="font-size: 64px; width: 5000px; height: 5000px;">
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
@@ -39,16 +39,17 @@
Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text. Tere is a lot of text.<br>
</div>
</div>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
+"use strict";
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(runTests, window);
var gScrollableElement = document.getElementById("scrollable");
var gScrolledElement = document.getElementById("scrolled");
var gLineHeight = 0;
--- a/dom/tests/mochitest/chrome/queryCaretRectWin.html
+++ b/dom/tests/mochitest/chrome/queryCaretRectWin.html
@@ -15,17 +15,17 @@
-->
<style>
#text {
position: absolute;
left: 0em;
top: 0em;
font-size: 10pt;
- font-family: monospace;
+ font-family: 'Courier New';
line-height: 20px;
letter-spacing: 0px;
margin-top:-1px; /* nix the text area border */
overflow: hidden;
width:800px;
height:400px;
}
#div-hor {
--- a/dom/tests/mochitest/chrome/selectAtPoint.html
+++ b/dom/tests/mochitest/chrome/selectAtPoint.html
@@ -1,16 +1,18 @@
<!DOCTYPE HTML>
<html>
<head>
<title>nsIDOMWindowUtils::selectAtPoint test</title>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-<script type="application/javascript">
+<script>
+ "use strict";
+
var SimpleTest = window.opener.SimpleTest;
var Ci = Components.interfaces;
function ok() { window.opener.ok.apply(window.opener, arguments); }
function done() { window.opener.done.apply(window.opener, arguments); }
function dumpLn() {
for (let idx = 0; idx < arguments.length; idx++)
@@ -122,23 +124,17 @@
// Separate character blocks in a word 't(te)s(ts)election1'
targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)),
yPos: rect.top + (charDims.height / 2) };
setStart(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER);
targetPoint = { xPos: rect.left + ((charDims.width * 4) + (charDims.width / 2)),
yPos: rect.top + (charDims.height / 2) };
setEnd(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER);
- if (isLinux || isMac) {
- // XXX I think this is a bug, the right hand selection is 4.5 characters over with a
- // monspaced font. what we want: t(te)s(ts)election1 what we get: t(te)st(se)lection1
- checkSelection(document, "split selection", "tese");
- } else if (isWindows) {
checkSelection(document, "split selection", "tets");
- }
// Trying to select where there's no text, should fail but not throw
let result = dwu.selectAtPoint(rect.left - 20, rect.top - 20, Ci.nsIDOMWindowUtils.SELECT_CHARACTER, false);
ok(result == false, "couldn't select?");
// Second div in the main page
div = document.getElementById("div2");
@@ -223,17 +219,17 @@
}
window.addEventListener("MozAfterPaint", onPaint);
</script>
<style type="text/css">
body {
- font-family: monospace;
+ font-family: 'Courier New';
margin-left: 40px;
margin-top: 40px;
padding: 0;
}
#div1 {
border: 1px solid red;
width: 400px;
@@ -262,17 +258,17 @@ body {
</style>
</head>
<body id="body" onload="onPageLoad();">
<div id="div1">ttestselection1 Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut. Ne labore incorrupte vix. Cu copiosae postulant tincidunt ius, in illud appetere contentiones eos. Ei munere officiis assentior pro, nibh decore ius at.</div>
<br />
-<iframe id="frame1" src="data:text/html,<html><body style='margin: 0; padding: 0; font-family: monospace;' onload='window.parent.onFrameLoad();'><div id='sel2'>ttestselection2 Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut.</div><br/><br/></body></html>"></iframe>
+<iframe id="frame1" src="data:text/html,<html><body style='margin: 0; padding: 0; font-family: \'Courier New\';' onload='window.parent.onFrameLoad();'><div id='sel2'>ttestselection2 Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut.</div><br/><br/></body></html>"></iframe>
<br/>
<div id="div2">Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut. Ne labore incorrupte vix. Cu copiosae postulant tincidunt ius, in illud appetere contentiones eos.</div>
<br />
<span id="measure">t</span>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -20,17 +20,17 @@ load 309322-1.html # bug 1338007
load 309322-2.html # bug 1338007
load 309322-3.html
load 309322-4.html
load 310556-1.xhtml
load 321224.xul
load 322780-1.xul
load 323381-1.html
load 323381-2.html
-asserts-if(gtkWidget,1) asserts-if(Android&&asyncPan,1) asserts-if(stylo,0) load 323386-1.html # Bug 718883
+asserts-if(gtkWidget,1) asserts-if(Android&&asyncPan,1) asserts-if(stylo,0) asserts-if(winWidget,1) load 323386-1.html # Bug 718883
load 323389-1.html
load 323389-2.html
load 323493-1.html
load 323495-1.html
load 324318-1.html
load 328946-1.html
load 331284-1.xhtml
load 331292.html
--- a/layout/reftests/forms/input/text/reftest.list
+++ b/layout/reftests/forms/input/text/reftest.list
@@ -1,10 +1,10 @@
== bounds-1.html bounds-1-ref.html
-fuzzy-if(asyncPan&&!layersGPUAccelerated,140,111) == size-1.html size-1-ref.html
+fuzzy-if(asyncPan&&!layersGPUAccelerated,140,111) fuzzy-if(winWidget,24,1) == size-1.html size-1-ref.html
== size-2.html size-2-ref.html
HTTP(..) == baseline-1.html baseline-1-ref.html
HTTP(..) == centering-1.xul centering-1-ref.xul
== dynamic-height-1.xul dynamic-height-1-ref.xul
fuzzy-if(skiaContent,1,500) needs-focus == select.html select-ref.html
== intrinsic-size.html intrinsic-size-ref.html
== line-height-0.5.html line-height-1.0.html
!= line-height-1.5.html line-height-1.0.html
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3244,22 +3244,22 @@ pref("ui.mouse.radius.visitedWeight", 12
// When false, the prefs will be used for all mouse events.
pref("ui.mouse.radius.inputSource.touchOnly", true);
#ifdef XP_WIN
pref("font.name.serif.ar", "Times New Roman");
pref("font.name.sans-serif.ar", "Segoe UI");
pref("font.name-list.sans-serif.ar", "Segoe UI, Tahoma, Arial");
-pref("font.name.monospace.ar", "Courier New");
+pref("font.name.monospace.ar", "Consolas");
pref("font.name.cursive.ar", "Comic Sans MS");
pref("font.name.serif.el", "Times New Roman");
pref("font.name.sans-serif.el", "Arial");
-pref("font.name.monospace.el", "Courier New");
+pref("font.name.monospace.el", "Consolas");
pref("font.name.cursive.el", "Comic Sans MS");
pref("font.name.serif.he", "Narkisim");
pref("font.name.sans-serif.he", "Arial");
pref("font.name.monospace.he", "Fixed Miriam Transparent");
pref("font.name.cursive.he", "Guttman Yad");
pref("font.name-list.serif.he", "Narkisim, David");
pref("font.name-list.monospace.he", "Fixed Miriam Transparent, Miriam Fixed, Rod, Courier New");
@@ -3284,27 +3284,27 @@ pref("font.name-list.cursive.ko", "Gungs
pref("font.name.serif.th", "Tahoma");
pref("font.name.sans-serif.th", "Tahoma");
pref("font.name.monospace.th", "Tahoma");
pref("font.name.cursive.th", "Tahoma");
pref("font.name.serif.x-cyrillic", "Times New Roman");
pref("font.name.sans-serif.x-cyrillic", "Arial");
-pref("font.name.monospace.x-cyrillic", "Courier New");
+pref("font.name.monospace.x-cyrillic", "Consolas");
pref("font.name.cursive.x-cyrillic", "Comic Sans MS");
pref("font.name.serif.x-unicode", "Times New Roman");
pref("font.name.sans-serif.x-unicode", "Arial");
-pref("font.name.monospace.x-unicode", "Courier New");
+pref("font.name.monospace.x-unicode", "Consolas");
pref("font.name.cursive.x-unicode", "Comic Sans MS");
pref("font.name.serif.x-western", "Times New Roman");
pref("font.name.sans-serif.x-western", "Arial");
-pref("font.name.monospace.x-western", "Courier New");
+pref("font.name.monospace.x-western", "Consolas");
pref("font.name.cursive.x-western", "Comic Sans MS");
pref("font.name.serif.zh-CN", "SimSun");
pref("font.name.sans-serif.zh-CN", "Microsoft YaHei");
pref("font.name.monospace.zh-CN", "SimSun");
pref("font.name.cursive.zh-CN", "KaiTi");
pref("font.name-list.serif.zh-CN", "MS Song, SimSun, SimSun-ExtB");
pref("font.name-list.sans-serif.zh-CN", "Microsoft YaHei, SimHei");
@@ -3439,17 +3439,17 @@ pref("font.name-list.sans-serif.x-tibt",
pref("font.name-list.monospace.x-tibt", "Tibetan Machine Uni, Jomolhari, Microsoft Himalaya");
pref("font.minimum-size.th", 10);
pref("font.default.x-devanagari", "sans-serif");
pref("font.name.serif.x-math", "Latin Modern Math");
pref("font.name-list.serif.x-math", "Latin Modern Math, STIX Two Math, XITS Math, Cambria Math, Libertinus Math, DejaVu Math TeX Gyre, TeX Gyre Bonum Math, TeX Gyre Pagella Math, TeX Gyre Schola, TeX Gyre Termes Math, STIX Math, Asana Math, STIXGeneral, DejaVu Serif, DejaVu Sans, Times New Roman");
pref("font.name.sans-serif.x-math", "Arial");
-pref("font.name.monospace.x-math", "Courier New");
+pref("font.name.monospace.x-math", "Consolas");
pref("font.name.cursive.x-math", "Comic Sans MS");
// ClearType tuning parameters for directwrite/d2d.
//
// Allows overriding of underlying registry values in:
// HKCU/Software/Microsoft/Avalon.Graphics/<display> (contrast and level)
// HKLM/Software/Microsoft/Avalon.Graphics/<display> (gamma, pixel structure)
// and selection of the ClearType/antialiasing mode.