From ac1756e5bb8131bdf9277bea44e8f4434074231f Mon Sep 17 00:00:00 2001 From: Casey Peel Date: Wed, 24 Dec 2025 07:42:33 -0800 Subject: [PATCH] Remove user-preferred proofreading font used elsewhere Use DP Sans Mono rather than the user's preferred proofreading font except in the proofreading interface. --- faq/font_sample.php | 32 ++------------------------- pinc/DifferenceEngineWrapperTable.inc | 9 +------- styles/layout.less | 1 + styles/themes/charcoal.css | 1 + styles/themes/classic_grey.css | 1 + styles/themes/project_gutenberg.css | 1 + styles/themes/royal_blues.css | 1 + tools/charsuites.php | 10 +++------ 8 files changed, 11 insertions(+), 45 deletions(-) diff --git a/faq/font_sample.php b/faq/font_sample.php index f08343347c..d166c2319a 100644 --- a/faq/font_sample.php +++ b/faq/font_sample.php @@ -2,19 +2,12 @@ $relPath = '../pinc/'; include_once($relPath.'base.inc'); include_once($relPath.'theme.inc'); -include_once($relPath.'prefs_options.inc'); // Note: The text used for font sample images is stored in font_sample.txt $title = _("Proofreading Font Comparison"); output_header($title, NO_STATSBAR); -// determine user's current proofreading font, if any and use that as the compare_font -[$proofreading_font, , $proofreading_font_family] = get_user_proofreading_font(); -if (!$proofreading_font) { - $proofreading_font = 'monospace'; -} - // print page header echo "

$title

\n"; @@ -24,7 +17,6 @@ echo "

" . sprintf(_("The following fonts can be selected in your preferences 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") . "

"; -$show_user_custom_font = true; foreach (get_available_proofreading_font_faces() as $index => $name) { if ($index == 1) { // other continue; @@ -37,17 +29,7 @@ $font = $name; } - if ($font == $proofreading_font) { - $show_user_custom_font = false; - } - - show_font_specimen($name, $font, $proofreading_font); -} - -if ($show_user_custom_font) { - echo "

" . _("Custom Proofreading Font") . "

"; - echo "

" . _("Your current proofreading font is one you've specified by name. This is what a specimen looks like in that font.") . "

"; - show_font_specimen($proofreading_font, $proofreading_font); + show_font_specimen($name, $font); } echo "

DP Sans Mono

"; @@ -78,25 +60,19 @@ echo "
"; echo "" . BROWSER_DEFAULT_STR . "
"; -if ($proofreading_font !== 'monospace' && $proofreading_font != 'DP Sans Mono') { - echo "" . html_safe($proofreading_font) . "
"; -} echo "DP Sans Mono"; echo "
"; foreach ($character_sets as $set) { echo "
"; echo "$set
"; - if ($proofreading_font !== 'monospace' && $proofreading_font != 'DP Sans Mono') { - echo "$set
"; - } echo "$set"; echo "
"; } // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -function show_font_specimen($name, $font, $proofreading_font = null) +function show_font_specimen($name, $font) { echo "
"; //echo "

$name

"; @@ -107,9 +83,5 @@ function show_font_specimen($name, $font, $proofreading_font = null) echo "0123456789
"; echo "!@#$%^&*()[]{}<>'\";:.,\/?
"; echo "

"; - - if ($font == $proofreading_font) { - echo "

" . _("This is your current proofreading font.") . "

"; - } echo "
"; } diff --git a/pinc/DifferenceEngineWrapperTable.inc b/pinc/DifferenceEngineWrapperTable.inc index 3f8dd1a09a..06369af572 100644 --- a/pinc/DifferenceEngineWrapperTable.inc +++ b/pinc/DifferenceEngineWrapperTable.inc @@ -1,7 +1,6 @@ " . html_safe($title) . ""; echo "

" . _("View all character suites") . "

"; echo "

"; @@ -48,7 +44,7 @@ } elseif ($projectid) { $project = new Project($projectid); $title = _("Project Character Suites"); - output_header($title, NO_STATSBAR, $extra_args); + output_header($title, NO_STATSBAR); echo "

" . html_safe($title) . "

"; echo "

" . sprintf( _("Character Suites for %s."), @@ -61,7 +57,7 @@ } } else { $title = _("All Character Suites"); - output_header($title, NO_STATSBAR, $extra_args); + output_header($title, NO_STATSBAR); echo "

" . html_safe($title) . "

"; echo "

"; echo _("Below are all enabled character suites in the system.");