diff --git a/SOURCES/okular-add-information-about-substituting-font.patch b/SOURCES/okular-add-information-about-substituting-font.patch new file mode 100644 index 0000000..f5c5e80 --- /dev/null +++ b/SOURCES/okular-add-information-about-substituting-font.patch @@ -0,0 +1,88 @@ +diff --git a/core/fontinfo.cpp b/core/fontinfo.cpp +index 59ea79f..a102632 100644 +--- a/core/fontinfo.cpp ++++ b/core/fontinfo.cpp +@@ -27,6 +27,7 @@ class Okular::FontInfoPrivate + bool operator==( const FontInfoPrivate &rhs ) const + { + return name == rhs.name && ++ substituteName == rhs.substituteName && + type == rhs.type && + embedType == rhs.embedType && + file == rhs.file && +@@ -35,6 +36,7 @@ class Okular::FontInfoPrivate + } + + QString name; ++ QString substituteName; + FontInfo::FontType type; + FontInfo::EmbedType embedType; + bool canBeExtracted; +@@ -67,6 +69,16 @@ void FontInfo::setName( const QString& name ) + d->name = name; + } + ++QString FontInfo::substituteName() const ++{ ++ return d->substituteName; ++} ++ ++void FontInfo::setSubstituteName( const QString& substituteName ) ++{ ++ d->substituteName = substituteName; ++} ++ + FontInfo::FontType FontInfo::type() const + { + return d->type; +diff --git a/core/fontinfo.h b/core/fontinfo.h +index d11b3b0..a7f5e78 100644 +--- a/core/fontinfo.h ++++ b/core/fontinfo.h +@@ -84,6 +84,16 @@ class OKULAR_EXPORT FontInfo + */ + void setName( const QString& name ); + ++ /** ++ * Returns the substitute name for the font. ++ */ ++ QString substituteName() const; ++ ++ /** ++ * Sets a new substitute name for the font. ++ */ ++ void setSubstituteName (const QString& substituteName ); ++ + /** + * Returns the type of the font. + */ +diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp +index 7d27f6e..71dec86 100644 +--- a/generators/poppler/generator_pdf.cpp ++++ b/generators/poppler/generator_pdf.cpp +@@ -827,6 +827,7 @@ Okular::FontInfo::List PDFGenerator::fontsForPage( int page ) + { + Okular::FontInfo of; + of.setName( font.name() ); ++ of.setSubstituteName( font.substituteName() ); + of.setType( convertPopplerFontInfoTypeToOkularFontInfoType( font.type() ) ); + of.setEmbedType( embedTypeForPopplerFontInfo( font) ); + of.setFile( font.file() ); +diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp +index dd7bb5c..ad61859 100644 +--- a/ui/propertiesdialog.cpp ++++ b/ui/propertiesdialog.cpp +@@ -368,7 +368,12 @@ QVariant FontsListModel::data( const QModelIndex &index, int role ) const + return descriptionForFontType( m_fonts.at( index.row() ).type() ); + break; + case 2: +- return pathOrDescription( m_fonts.at( index.row() ) ); ++ QString pathOrDesc = pathOrDescription( m_fonts.at( index.row() ) ); ++ QString substituteName = m_fonts.at( index.row() ).substituteName(); ++ if (m_fonts.at( index.row() ).embedType() == Okular::FontInfo::NotEmbedded && !substituteName.isEmpty()) { ++ return QString("%1 (substituting with %2)").arg(pathOrDesc).arg(substituteName); ++ } ++ return pathOrDesc; + break; + } + break; diff --git a/SPECS/okular.spec b/SPECS/okular.spec index aa911fd..19a780a 100644 --- a/SPECS/okular.spec +++ b/SPECS/okular.spec @@ -1,7 +1,7 @@ -Name: okular +Name: okular Summary: A document viewer Version: 4.10.5 -Release: 4%{?dist} +Release: 7%{?dist} License: GPLv2 URL: https://projects.kde.org/projects/kde/kdegraphics/okular @@ -26,6 +26,8 @@ Patch52: okular-gcc-overflow.patch # don't build component if ACTIVEAPP_FOUND FALSE Patch53: okular-4.10-cmake.patch +Patch54: okular-add-information-about-substituting-font.patch + %if 0%{?fedora} BuildRequires: chmlib-devel BuildRequires: ebook-tools-devel @@ -48,7 +50,7 @@ Requires: %{name}-part%{?_isa} = %{version}-%{release} %if 0%{?fedora} Requires: kio_msits = %{kio_msits_epoch}:%{version}-%{release} %endif -Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}} +Requires: kde-runtime >= 4.10.5 %description %{summary}. @@ -95,6 +97,7 @@ Summary: A kioslave for displaying WinHelp files %patch51 -p2 -b .OkularConfig %patch52 -p1 -b .overflow %patch53 -p1 -b .cmake +%patch54 -p1 -b .add-information-about-substituting-font %build mkdir -p %{_target_platform} @@ -177,6 +180,18 @@ fi %changelog +* Tue May 07 2019 Jan Grulich - 4.10.5-7 +- Fix patch adding information about substituting font + Resolves: bz#1458037 + +* Fri Feb 01 2019 Jan Grulich - 4.10.5-6 +- Fix broken dependency on kde-runtime + Resolves: bz#1670723 + +* Thu Jan 17 2019 Jan Grulich - 4.10.5-5 +- Add information about substituting font + Resolves: bz#1458037 + * Fri Jan 24 2014 Daniel Mach - 4.10.5-4 - Mass rebuild 2014-01-24