Skip to content

Commit

Permalink
[labeling] Fix font family changes when font size is too small
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed May 29, 2024
1 parent b4b8481 commit 1ae7a8d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/gui/qgstextformatwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1307,16 +1307,13 @@ void QgsTextFormatWidget::updateFont( const QFont &newFont )
// NOTE: QgsFontUtils::fontMatchOnSystem may fail here, just crosscheck family
mFontMissingLabel->setVisible( !QgsFontUtils::fontFamilyMatchOnSystem( mRefFont.family() ) );

if ( mDirectSymbolsFrame->isVisible() )
{
QFont symbolFont = mRefFont;
symbolFont.setPointSize( font().pointSize() );
mDirectSymbLeftLineEdit->setFont( symbolFont );
mDirectSymbRightLineEdit->setFont( symbolFont );
}
QFont symbolFont = mRefFont;
symbolFont.setPointSize( font().pointSize() );
mDirectSymbLeftLineEdit->setFont( symbolFont );
mDirectSymbRightLineEdit->setFont( symbolFont );

blockFontChangeSignals( true );
mFontFamilyCmbBx->setCurrentFont( mRefFont );
mFontFamilyCmbBx->setCurrentFont( symbolFont );
populateFontStyleComboBox();
mFontUnderlineBtn->setChecked( mRefFont.underline() );
mFontStrikethroughBtn->setChecked( mRefFont.strikeOut() );
Expand Down

0 comments on commit 1ae7a8d

Please sign in to comment.