mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #173: errors loading file Echoplex.pdf
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2019-2022 Jakub Melka
|
// Copyright (C) 2019-2024 Jakub Melka
|
||||||
//
|
//
|
||||||
// This file is part of PDF4QT.
|
// This file is part of PDF4QT.
|
||||||
//
|
//
|
||||||
@ -93,6 +93,23 @@ static constexpr std::array S_DEFAULT_CJK_FONTS =
|
|||||||
PDF_Default_CJK_Font{ ECjkDefaultFontType::AdobeKorea, true, "Batang" },
|
PDF_Default_CJK_Font{ ECjkDefaultFontType::AdobeKorea, true, "Batang" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct PDF_Font_Replacement
|
||||||
|
{
|
||||||
|
const char* origFont;
|
||||||
|
const char* replaceFont;
|
||||||
|
};
|
||||||
|
|
||||||
|
static constexpr std::array S_FONT_REPLACEMENTS
|
||||||
|
{
|
||||||
|
PDF_Font_Replacement{"Futura", "Calibri"},
|
||||||
|
PDF_Font_Replacement{"Utopia-Bold", "Georgia"},
|
||||||
|
PDF_Font_Replacement{"Utopia-BoldItalic", "Georgia"},
|
||||||
|
PDF_Font_Replacement{"Utopia-Italic", "Georgia"},
|
||||||
|
PDF_Font_Replacement{"Utopia-Semibold", "Georgia"},
|
||||||
|
PDF_Font_Replacement{"Utopia-SemiboldItalic", "Georgia"},
|
||||||
|
PDF_Font_Replacement{"Utopia", "Georgia"},
|
||||||
|
};
|
||||||
|
|
||||||
/// Storage class for system fonts
|
/// Storage class for system fonts
|
||||||
class PDFSystemFontInfoStorage
|
class PDFSystemFontInfoStorage
|
||||||
{
|
{
|
||||||
@ -250,6 +267,22 @@ QByteArray PDFSystemFontInfoStorage::loadFont(const CIDSystemInfo* cidSystemInfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fontData.isEmpty())
|
||||||
|
{
|
||||||
|
for (const PDF_Font_Replacement& fontReplacement : S_FONT_REPLACEMENTS)
|
||||||
|
{
|
||||||
|
if (fontName.contains(QLatin1String(fontReplacement.origFont)))
|
||||||
|
{
|
||||||
|
fontData = loadFontImpl(descriptor, QString(fontReplacement.replaceFont), StandardFontType::Invalid, reporter);
|
||||||
|
|
||||||
|
if (!fontData.isEmpty())
|
||||||
|
{
|
||||||
|
return fontData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return fontData;
|
return fontData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2019-2021 Jakub Melka
|
// Copyright (C) 2019-2024 Jakub Melka
|
||||||
//
|
//
|
||||||
// This file is part of PDF4QT.
|
// This file is part of PDF4QT.
|
||||||
//
|
//
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
CURRENT:
|
CURRENT:
|
||||||
|
- Issue #173: errors loading file Echoplex.pdf
|
||||||
- Issue #172: access keys are missing from most menu items/action text strings
|
- Issue #172: access keys are missing from most menu items/action text strings
|
||||||
- Issue #168: When opening a PDF file or merging some PDF files, stamp will disappear.
|
- Issue #168: When opening a PDF file or merging some PDF files, stamp will disappear.
|
||||||
- Issue #164: Taskbar icon not shown in linux mint.
|
- Issue #164: Taskbar icon not shown in linux mint.
|
||||||
|
Reference in New Issue
Block a user