MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / customMonoFont

Method customMonoFont

app/src/Misc/CommonFonts.cpp:143–151  ·  view source on GitHub ↗

* @brief Creates a custom monospace font with specified size and boldness. */

Source from the content-addressed store, hash-verified

141 * @brief Creates a custom monospace font with specified size and boldness.
142 */
143QFont Misc::CommonFonts::customMonoFont(const double fraction, const bool bold)
144{
145 QFont font = m_monoFont;
146 font.setPointSizeF(m_monoFont.pointSizeF() * qMax(0.1, fraction));
147 if (bold)
148 font.setWeight(QFont::Medium);
149
150 return font;
151}
152
153//--------------------------------------------------------------------------------------------------
154// Widget font properties

Callers 1

renderCameraIndicatorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected