22$ relPath = '../pinc/ ' ;
33include_once ($ relPath .'base.inc ' );
44include_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 " );
109output_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
1912echo "<h1> $ title</h1> \n" ;
2013
2417
2518echo "<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 ;
2820foreach (get_available_proofreading_font_faces () as $ index => $ name ) {
2921 if ($ index == 1 ) { // other
3022 continue ;
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
5335echo "<h2 id='DPSansMono' style='clear: both;'>DP Sans Mono</h2> " ;
7860
7961echo "<div style='float: left; padding-right: 1em; margin-bottom: 1em;'> " ;
8062echo "<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- }
8463echo "<span style='font-family: DP Sans Mono;'>DP Sans Mono</span> " ;
8564echo "</div> " ;
8665
8766foreach ($ 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 "!@#$%^&*()[]{}<>' \";:.,\/?<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}
0 commit comments