[RCU] TinyMCE should offer generic font families.

Kaz Kylheku 937-737-6257 at kylheku.com
Tue Mar 8 18:58:22 CET 2022


In HTML coding, you often don't care about the specific font; you just 
want "font-family: monospace" and not, say, "Andale Mono".

The W3C provides five generic fonts: serif, sans-serif, monospace, 
cursive and fantasy:

Patch against older version in Debian 11:

diff --git 
a/usr/share/roundcube/program/js/tinymce/themes/modern/theme.js 
b/usr/share/roundcube/program/js/tinymce/themes/modern/theme.js

index c3d821a..ecf6bd7 100644

--- a/usr/share/roundcube/program/js/tinymce/themes/modern/theme.js

+++ b/usr/share/roundcube/program/js/tinymce/themes/modern/theme.js

@@ -7170,7 +7170,7 @@ var modern = (function (domGlobals) {

return formats;

};

var getFontItems = function (editor) {

- var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 
'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial 
black,sans-serif;' + 'Plain Mono=monospace;' + 'Book Antiqua=book 
antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 
'Courier New=courier new,courier,monospace;' + 
'Georgia=georgia,palatino,serif;' + 
'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 
'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 
'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new 
roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 
'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 
'Wingdings=wingdings,zapf dingbats';

+ var defaultFontsFormats = 'Generic Serif=serif;' + 'Generic Sans 
Serif=sans-serif;' + 'Generic Mono=monospace;' + 'Generic 
Cursive=cursive;' + 'Generic Fantasy=fantasy;' + 'Andale Mono=andale 
mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial 
Black=arial black,sans-serif;' + 'Book Antiqua=book 
antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 
'Courier New=courier new,courier,monospace;' + 
'Georgia=georgia,palatino,serif;' + 
'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 
'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 
'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new 
roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 
'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 
'Wingdings=wingdings,zapf dingbats';

var fonts = createFormats(editor.settings.font_formats || 
defaultFontsFormats);

return global$2.map(fonts, function (font) {

return {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20220308/7ffbd6b1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: da40f87f.png
Type: image/png
Size: 7568 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/users/attachments/20220308/7ffbd6b1/attachment.png>


More information about the users mailing list