diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp
index 3aa3e0572..01325674a 100644
--- a/ui/propertiesdialog.cpp
+++ b/ui/propertiesdialog.cpp
@@ -259,6 +259,23 @@ static QString pathOrDescription( const Okular::FontInfo &font )
return QString();
}
+static QString descriptionForEmbedType( Okular::FontInfo::EmbedType type )
+{
+ switch ( type )
+ {
+ case Okular::FontInfo::NotEmbedded:
+ return i18n("No");
+ break;
+ case Okular::FontInfo::EmbeddedSubset:
+ return i18n("Yes (subset)");
+ break;
+ case Okular::FontInfo::FullyEmbedded:
+ return i18n("Yes");
+ break;
+ }
+ return QString();
+}
+
QVariant FontsListModel::data( const QModelIndex &index, int role ) const
{
if ( !index.isValid() || index.row() < 0 || index.row() >= m_fonts.count() )
@@ -283,6 +300,19 @@ QVariant FontsListModel::data( const QModelIndex &index, int role ) const
break;
}
break;
+ case Qt::ToolTipRole:
+ {
+ QString fontname = m_fonts.at( index.row() ).name();
+ if ( fontname.isEmpty() )
+ fontname = i18n( "Unknown font" );
+ QString tooltip = QString::fromLatin1( "" ) + fontname + QString::fromLatin1( "" );
+ if ( m_fonts.at( index.row() ).embedType() == Okular::FontInfo::NotEmbedded )
+ tooltip += QString::fromLatin1( " (%2)" ).arg( fontname ).arg( fontname );
+ tooltip += QString::fromLatin1( "
" ) + i18n( "Embedded: %1", descriptionForEmbedType( m_fonts.at( index.row() ).embedType() ) );
+ tooltip += QString::fromLatin1( "" );
+ return tooltip;
+ break;
+ }
}
return QVariant();