Skip to content

Commit ff1a624

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 ff1a624

File tree

8 files changed

+11
-43
lines changed

8 files changed

+11
-43
lines changed

faq/font_sample.php

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
$title = _("Proofreading Font Comparison");
1010
output_header($title, NO_STATSBAR);
1111

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-
1812
// print page header
1913
echo "<h1>$title</h1>\n";
2014

@@ -24,7 +18,6 @@
2418

2519
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>";
2620

27-
$show_user_custom_font = true;
2821
foreach (get_available_proofreading_font_faces() as $index => $name) {
2922
if ($index == 1) { // other
3023
continue;
@@ -37,17 +30,7 @@
3730
$font = $name;
3831
}
3932

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);
33+
show_font_specimen($name, $font);
5134
}
5235

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

7962
echo "<div style='float: left; padding-right: 1em; margin-bottom: 1em;'>";
8063
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-
}
8464
echo "<span style='font-family: DP Sans Mono;'>DP Sans Mono</span>";
8565
echo "</div>";
8666

8767
foreach ($character_sets as $set) {
8868
echo "<div style='float: left; padding-right: 0.5em; margin-bottom: 1em;'>";
8969
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-
}
9370
echo "<span style='font-family: DP Sans Mono;'>$set</span>";
9471
echo "</div>";
9572
}
9673

9774
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9875

99-
function show_font_specimen($name, $font, $proofreading_font = null)
76+
function show_font_specimen($name, $font)
10077
{
10178
echo "<div style='float: left; margin-right: 1em; margin-top: 0;'>";
10279
//echo "<h3>$name</h3>";
@@ -107,9 +84,5 @@ function show_font_specimen($name, $font, $proofreading_font = null)
10784
echo "0123456789<br>";
10885
echo "!@#$%^&*()[]{}&lt;&gt;'\";:.,\/?<br>";
10986
echo "</p>";
110-
111-
if ($font == $proofreading_font) {
112-
echo "<p><i>" . _("This is your current proofreading font.") . "</i></p>";
113-
}
11487
echo "</div>";
11588
}

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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@
3030
}
3131
}
3232

33-
[, , $font_family, ] = get_user_proofreading_font();
34-
$extra_args['css_data'] = ".gs-char { font-family: $font_family; }";
35-
3633
if ($charsuite) {
3734
$title = _("Character Suite");
38-
output_header($title, NO_STATSBAR, $extra_args);
35+
output_header($title, NO_STATSBAR);
3936
echo "<h1>" . html_safe($title) . "</h1>";
4037
echo "<p><a href='?'>" . _("View all character suites") . "</a></p>";
4138
echo "<p>";
@@ -48,7 +45,7 @@
4845
} elseif ($projectid) {
4946
$project = new Project($projectid);
5047
$title = _("Project Character Suites");
51-
output_header($title, NO_STATSBAR, $extra_args);
48+
output_header($title, NO_STATSBAR);
5249
echo "<h1>" . html_safe($title) . "</h1>";
5350
echo "<p>" . sprintf(
5451
_("Character Suites for <a href='%s'>%s</a>."),
@@ -61,7 +58,7 @@
6158
}
6259
} else {
6360
$title = _("All Character Suites");
64-
output_header($title, NO_STATSBAR, $extra_args);
61+
output_header($title, NO_STATSBAR);
6562
echo "<h1>" . html_safe($title) . "</h1>";
6663
echo "<p>";
6764
echo _("Below are all enabled character suites in the system.");

0 commit comments

Comments
 (0)