mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Add FormSpec font styling options (#9763)
* Add FormSpec font styling options * Change multiplication to stof * Remove extraneous check
This commit is contained in:
@@ -186,6 +186,21 @@ unsigned int FontEngine::getDefaultFontSize()
|
||||
return m_default_size[m_currentMode];
|
||||
}
|
||||
|
||||
unsigned int FontEngine::getFontSize(FontMode mode)
|
||||
{
|
||||
if (m_currentMode == FM_Simple) {
|
||||
if (mode == FM_Mono || mode == FM_SimpleMono)
|
||||
return m_default_size[FM_SimpleMono];
|
||||
else
|
||||
return m_default_size[FM_Simple];
|
||||
}
|
||||
|
||||
if (mode == FM_Unspecified)
|
||||
return m_default_size[FM_Standard];
|
||||
|
||||
return m_default_size[mode];
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void FontEngine::readSettings()
|
||||
{
|
||||
|
@@ -124,6 +124,9 @@ public:
|
||||
/** get default font size */
|
||||
unsigned int getDefaultFontSize();
|
||||
|
||||
/** get font size for a specific mode */
|
||||
unsigned int getFontSize(FontMode mode);
|
||||
|
||||
/** initialize font engine */
|
||||
void initialize(Settings* main_settings, gui::IGUIEnvironment* env);
|
||||
|
||||
|
Reference in New Issue
Block a user