COE Model Report Task: Rich Text Editor, "Only Web-Safe Fonts" Option Bug Number: n/a Release notes (y/n): Yes For Release Nums: 6.7 See the new checkbox: [x] Only Web-Safe Fonts: http://cadswes2.colorado.edu/~philw/2015/CoeModelRep/2015-04-26/OnlyWebSafeFontsOption.png This option is currently enabled (exposed) with this symbol in RwDoc/RichTextEdtior.cpp: static const bool SHOW_WEB_FONTS_OPTION (true); See google results on "web safe fonts", including this webpage: http://www.w3schools.com/cssref/css_websafe_fonts.asp Note: Expanding these fonts within the generated inlined CSS font-face styles to a sequence of fallback fonts was implemented, but was disabled (based on the following symbol). Multiple fonts in these styles ARE NOT round tripping well through the QTextEdit widget. That is putting single quotes around the whole list, rather than individual fonts -- and that BREAKS the CSS. The font specification no longer works, and the browser is defaulting to something else. static const bool ENA_EXPAND_WEB_FONTS (false); The supported Web Safe Fonts are defined in the following method. (The fallback fonts do play in a limited way, but are ultimately not provided in the generated HTML/CSS -- see the note above): // static, private void WebFontUtils::buildFontGroups() { // build only once const int cnt = WebFontUtils::FontGroup::_groups.count(); if (cnt > 0) return; //----->> // *************************************** // *** (1) Sans-Serif Fonts (Normal) *** // *************************************** AddFontGroup HelveticaNeue (FC_SansSerif, true); // default sans-serif HelveticaNeue << "Helvetica Neue"; HelveticaNeue << "Helvetica"; HelveticaNeue << "Arial"; HelveticaNeue << "sans-serif"; AddFontGroup Arial (FC_SansSerif); Arial << "Arial"; Arial << "Helvetica Neue"; Arial << "Helvetica"; Arial << "sans-serif"; AddFontGroup Verdana (FC_SansSerif); Verdana << "Verdana"; Verdana << "Tahoma"; Verdana << "Segoe"; Verdana << "sans-serif"; AddFontGroup LucidaSansUnicode (FC_SansSerif); LucidaSansUnicode << "Lucida Sans Unicode"; LucidaSansUnicode << "Lucida Grande"; LucidaSansUnicode << "sans-serif"; AddFontGroup Tahoma (FC_SansSerif); Tahoma << "Tahoma"; Tahoma << "Geneva"; Tahoma << "sans-serif"; AddFontGroup TrebuchetMs (FC_SansSerif); TrebuchetMs << "Trebuchet MS"; TrebuchetMs << "Helvetica"; TrebuchetMs << "sans-serif"; // ************************* // *** (2) Serif Fonts *** // ************************* AddFontGroup TimesNewRoman (FC_Serif, true); // default serif TimesNewRoman << "Times New Roman"; TimesNewRoman << "Times"; TimesNewRoman << "serif"; AddFontGroup Georgia (FC_Serif); Georgia << "Georgia"; Georgia << "Cambria"; Georgia << "Palatino"; Georgia << "serif"; AddFontGroup PalatinoLinotype (FC_Serif); PalatinoLinotype << "Palatino Linotype"; PalatinoLinotype << "Book Antiqua"; PalatinoLinotype << "Palatino"; PalatinoLinotype << "serif"; // ***************************** // *** (3) Monospace Fonts *** // ***************************** AddFontGroup CourierNew (FC_Monospace, true); // default monospace CourierNew << "Courier New"; CourierNew << "Courier"; CourierNew << "monospace"; AddFontGroup LucidaConsole (FC_Monospace); LucidaConsole << "Lucida Console"; LucidaConsole << "Monaco"; LucidaConsole << "monospace"; // *************************************** // *** (4) Sans-Serif Fonts (Weird) *** // *************************************** AddFontGroup ArialBlack (FC_SansSerif); ArialBlack << "Arial Black"; ArialBlack << "Gadget"; ArialBlack << "sans-serif"; AddFontGroup Impact (FC_SansSerif); Impact << "Impact"; Impact << "Charcoal"; Impact << "sans-serif"; AddFontGroup ComicSansMs (FC_SansSerif); ComicSansMs << "Comic Sans MS"; ComicSansMs << "cursive"; ComicSansMs << "sans-serif"; }