| Summary: | No italic Bitstream fonts in (HTML) composer | ||
|---|---|---|---|
| Product: | [Unmaintained] kmail | Reporter: | Hasso Tepper <hasso> |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.8.50 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Hasso Tepper
2005-05-09 09:38:28 UTC
SVN commit 571724 by winterz:
Fix detection of bold and italics in fonts.
BUGS: 105340,95276
M +9 -7 kmcomposewin.cpp
--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #571723:571724
@@ -4614,18 +4614,21 @@
void KMComposeWin::fontChanged( const QFont &f )
{
- QFontDatabase *fontdb = new QFontDatabase();
+ QFont fontTemp = f;
+ fontTemp.setBold( true );
+ fontTemp.setItalic( true );
+ QFontInfo fontInfo( fontTemp );
- if ( fontdb->bold( f.family(), "Bold" ) ) {
- textBoldAction->setChecked( f.bold() ); // if the user has the default font with bold, then show it in the buttonstate
- textBoldAction->setEnabled( true );
+ if ( fontInfo.bold() ) {
+ textBoldAction->setChecked( f.bold() );
+ textBoldAction->setEnabled( true ) ;
} else {
textBoldAction->setEnabled( false );
}
- if ( fontdb->italic( f.family(), "Italic" ) ) {
+ if ( fontInfo.italic() ) {
textItalicAction->setChecked( f.italic() );
- textItalicAction->setEnabled( true );
+ textItalicAction->setEnabled( true ) ;
} else {
textItalicAction->setEnabled( false );
}
@@ -4634,7 +4637,6 @@
fontAction->setFont( f.family() );
fontSizeAction->setFontSize( f.pointSize() );
- delete fontdb;
}
void KMComposeWin::alignmentChanged( int a )
|