99$ title = _ ("Proofreading Font Comparison " );
1010output_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
1913echo "<h1> $ title</h1> \n" ;
2014
2418
2519echo "<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 ;
2821foreach (get_available_proofreading_font_faces () as $ index => $ name ) {
2922 if ($ index == 1 ) { // other
3023 continue ;
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
5336echo "<h2 id='DPSansMono' style='clear: both;'>DP Sans Mono</h2> " ;
7861
7962echo "<div style='float: left; padding-right: 1em; margin-bottom: 1em;'> " ;
8063echo "<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- }
8464echo "<span style='font-family: DP Sans Mono;'>DP Sans Mono</span> " ;
8565echo "</div> " ;
8666
8767foreach ($ 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 "!@#$%^&*()[]{}<>' \";:.,\/?<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}
0 commit comments