Skip to content

Commit ac1756e

Browse files
committed
Remove user-preferred proofreading font used elsewhere
Use DP Sans Mono rather than the user's preferred proofreading font except in the proofreading interface.
1 parent 0edcfc1 commit ac1756e

File tree

8 files changed

+11
-45
lines changed

8 files changed

+11
-45
lines changed

faq/font_sample.php

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@
22
$relPath = '../pinc/';
33
include_once($relPath.'base.inc');
44
include_once($relPath.'theme.inc');
5-
include_once($relPath.'prefs_options.inc');
65

76
// Note: The text used for font sample images is stored in font_sample.txt
87

98
$title = _("Proofreading Font Comparison");
109
output_header($title, NO_STATSBAR);
1110

12-
// determine user's current proofreading font, if any and use that as the compare_font
13-
[$proofreading_font, , $proofreading_font_family] = get_user_proofreading_font();
14-
if (!$proofreading_font) {
15-
$proofreading_font = 'monospace';
16-
}
17-
1811
// print page header
1912
echo "<h1>$title</h1>\n";
2013

@@ -24,7 +17,6 @@
2417

2518
echo "<p>" . sprintf(_("The following fonts can be selected in your <a href='%s'>preferences</a> for use in the proofreading interface. Browser default is whatever font your browser renders monospace text in unless told otherwise, often Courier or Courier New. The other fonts are available as web fonts and can be selected and used without having them installed on your computer."), "$code_url/userprefs.php?tab=1") . "</p>";
2619

27-
$show_user_custom_font = true;
2820
foreach (get_available_proofreading_font_faces() as $index => $name) {
2921
if ($index == 1) { // other
3022
continue;
@@ -37,17 +29,7 @@
3729
$font = $name;
3830
}
3931

40-
if ($font == $proofreading_font) {
41-
$show_user_custom_font = false;
42-
}
43-
44-
show_font_specimen($name, $font, $proofreading_font);
45-
}
46-
47-
if ($show_user_custom_font) {
48-
echo "<h2 style='clear: both;'>" . _("Custom Proofreading Font") . "</h2>";
49-
echo "<p>" . _("Your current proofreading font is one you've specified by name. This is what a specimen looks like in that font.") . "</p>";
50-
show_font_specimen($proofreading_font, $proofreading_font);
32+
show_font_specimen($name, $font);
5133
}
5234

5335
echo "<h2 id='DPSansMono' style='clear: both;'>DP Sans Mono</h2>";
@@ -78,25 +60,19 @@
7860

7961
echo "<div style='float: left; padding-right: 1em; margin-bottom: 1em;'>";
8062
echo "<span style='font-family: monospace;'>" . BROWSER_DEFAULT_STR . "</span><br>";
81-
if ($proofreading_font !== 'monospace' && $proofreading_font != 'DP Sans Mono') {
82-
echo "<span style=\"font-family: $proofreading_font_family;\">" . html_safe($proofreading_font) . "</span><br>";
83-
}
8463
echo "<span style='font-family: DP Sans Mono;'>DP Sans Mono</span>";
8564
echo "</div>";
8665

8766
foreach ($character_sets as $set) {
8867
echo "<div style='float: left; padding-right: 0.5em; margin-bottom: 1em;'>";
8968
echo "<span style='font-family: monospace;'>$set</span><br>";
90-
if ($proofreading_font !== 'monospace' && $proofreading_font != 'DP Sans Mono') {
91-
echo "<span style=\"font-family: $proofreading_font_family;\">$set</span><br>";
92-
}
9369
echo "<span style='font-family: DP Sans Mono;'>$set</span>";
9470
echo "</div>";
9571
}
9672

9773
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9874

99-
function show_font_specimen($name, $font, $proofreading_font = null)
75+
function show_font_specimen($name, $font)
10076
{
10177
echo "<div style='float: left; margin-right: 1em; margin-top: 0;'>";
10278
//echo "<h3>$name</h3>";
@@ -107,9 +83,5 @@ function show_font_specimen($name, $font, $proofreading_font = null)
10783
echo "0123456789<br>";
10884
echo "!@#$%^&*()[]{}&lt;&gt;'\";:.,\/?<br>";
10985
echo "</p>";
110-
111-
if ($font == $proofreading_font) {
112-
echo "<p><i>" . _("This is your current proofreading font.") . "</i></p>";
113-
}
11486
echo "</div>";
11587
}

pinc/DifferenceEngineWrapperTable.inc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
// This file inherits from DifferenceEngineWrapper to facilitate
33
// formatting diffs in an HTML table.
4-
include_once($relPath."prefs_options.inc"); // get_user_proofreading_font()
54
include_once($relPath."DifferenceEngineWrapper.inc");
65
include_once($relPath."3rdparty/mediawiki/TableDiffFormatter.php");
76

@@ -62,11 +61,6 @@ class DifferenceEngineWrapperTable extends DifferenceEngineWrapper
6261
*/
6362
function get_DifferenceEngine_css_data()
6463
{
65-
[, $font_size, $font_family] = get_user_proofreading_font();
66-
if ($font_size != '') {
67-
$font_size = "font-size: $font_size;";
68-
}
69-
7064
return "
7165
.diff-otitle,
7266
.diff-ntitle {
@@ -76,8 +70,7 @@ function get_DifferenceEngine_css_data()
7670
.diff-addedline,
7771
.diff-deletedline,
7872
.diff-context {
79-
font-family: $font_family;
80-
$font_size
73+
font-family: DP Sans Mono;
8174
}
8275
/* Adjust padding to prevent descenders from being chopped off. Task 1936 */
8376
.diff-deletedline .diffchange,

styles/layout.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,7 @@ td.has-diff {
17261726

17271727
.gs-char {
17281728
font-size: 1.5em;
1729+
font-family: DP Sans Mono;
17291730
}
17301731

17311732
.gs-codepoint {

styles/themes/charcoal.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,6 +2731,7 @@ td.has-diff {
27312731
/* CharSuite Explorer */
27322732
.gs-char {
27332733
font-size: 1.5em;
2734+
font-family: DP Sans Mono;
27342735
}
27352736
.gs-codepoint {
27362737
font-size: 0.7em;

styles/themes/classic_grey.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,6 +2731,7 @@ td.has-diff {
27312731
/* CharSuite Explorer */
27322732
.gs-char {
27332733
font-size: 1.5em;
2734+
font-family: DP Sans Mono;
27342735
}
27352736
.gs-codepoint {
27362737
font-size: 0.7em;

styles/themes/project_gutenberg.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,6 +2731,7 @@ td.has-diff {
27312731
/* CharSuite Explorer */
27322732
.gs-char {
27332733
font-size: 1.5em;
2734+
font-family: DP Sans Mono;
27342735
}
27352736
.gs-codepoint {
27362737
font-size: 0.7em;

styles/themes/royal_blues.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,6 +2731,7 @@ td.has-diff {
27312731
/* CharSuite Explorer */
27322732
.gs-char {
27332733
font-size: 1.5em;
2734+
font-family: DP Sans Mono;
27342735
}
27352736
.gs-codepoint {
27362737
font-size: 0.7em;

tools/charsuites.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
include_once($relPath."theme.inc");
55
include_once($relPath."unicode.inc");
66
include_once($relPath."CharSuites.inc");
7-
include_once($relPath."prefs_options.inc");
87
include_once($relPath."Project.inc"); // get_projectID_param()
98

109
require_login();
@@ -30,12 +29,9 @@
3029
}
3130
}
3231

33-
[, , $font_family, ] = get_user_proofreading_font();
34-
$extra_args['css_data'] = ".gs-char { font-family: $font_family; }";
35-
3632
if ($charsuite) {
3733
$title = _("Character Suite");
38-
output_header($title, NO_STATSBAR, $extra_args);
34+
output_header($title, NO_STATSBAR);
3935
echo "<h1>" . html_safe($title) . "</h1>";
4036
echo "<p><a href='?'>" . _("View all character suites") . "</a></p>";
4137
echo "<p>";
@@ -48,7 +44,7 @@
4844
} elseif ($projectid) {
4945
$project = new Project($projectid);
5046
$title = _("Project Character Suites");
51-
output_header($title, NO_STATSBAR, $extra_args);
47+
output_header($title, NO_STATSBAR);
5248
echo "<h1>" . html_safe($title) . "</h1>";
5349
echo "<p>" . sprintf(
5450
_("Character Suites for <a href='%s'>%s</a>."),
@@ -61,7 +57,7 @@
6157
}
6258
} else {
6359
$title = _("All Character Suites");
64-
output_header($title, NO_STATSBAR, $extra_args);
60+
output_header($title, NO_STATSBAR);
6561
echo "<h1>" . html_safe($title) . "</h1>";
6662
echo "<p>";
6763
echo _("Below are all enabled character suites in the system.");

0 commit comments

Comments
 (0)