Skip to content

Commit

Permalink
feat: 字体安装器版权\许可证信息展示
Browse files Browse the repository at this point in the history
字体安装器版权\许可证信息展示

Log: 字体安装器版权\许可证信息展示
  • Loading branch information
myk1343 committed Mar 12, 2024
1 parent 2ac23f7 commit 75199e0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions deepin-font-manager/views/dfontinfoscrollarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ dfontinfoscrollarea::dfontinfoscrollarea(DFontPreviewItemData *pData, DWidget *
*************************************************************************/
void dfontinfoscrollarea::initUi()
{
QStringList sFontList;
sFontList << "Bitstream Charter-Regular" << "Bitstream Charter-Bold" << "Bitstream Charter-Italic"
<<"Bitstream Charter-Bold Italic" << "Courier 10 Pitch-Italic" << "Courier 10 Pitch-Bold Italic"
<< "Courier 10 Pitch-Regular" << "Courier 10 Pitch-Bold";
auto gridLayout = new QGridLayout;
gridLayout->setContentsMargins(0, 6, 0, 6);
gridLayout->setSpacing(3);
Expand All @@ -55,14 +59,25 @@ void dfontinfoscrollarea::initUi()
, DApplication::translate("FontDetailDailog", m_fontInfo->fontInfo.type.toLatin1()));
if (m_fontInfo->fontInfo.version.isEmpty()) {
QString version = "Copyright 2014~2015 Adobe Syste-ms Incorporated (http://www.adob.com/), with Reserved Font Name cc Source.";
if(sFontList.contains(m_fontInfo->fontData.strFontName)) {
version = "Copyright 1989-1992, Bitstream Inc., Cambridge, MA.";
}
createLabel(gridLayout, 2, DApplication::translate("FontDetailDailog", "Version"), version);
} else {
createLabel(gridLayout, 2, DApplication::translate("FontDetailDailog", "Version")
, m_fontInfo->fontInfo.version);
}
if (m_fontInfo->fontInfo.description.isEmpty()) {
createLabel(gridLayout, 3, DApplication::translate("FontDetailDailog", "Description")
, DApplication::translate("FontDetailDailog", "Unknown"));
if(!sFontList.contains(m_fontInfo->fontData.strFontName)) {
createLabel(gridLayout, 3, DApplication::translate("FontDetailDailog", "Description")
, DApplication::translate("FontDetailDailog", "Unknown"));
} else {
createLabel(gridLayout, 3, DApplication::translate("FontDetailDailog", "Description")
, DApplication::translate("FontDetailDailog", "You are hereby granted permission under all Bitstream propriety rights to use, copy, modify, sublicense, sell, and redistribute the 4 Bitstream Charter (r) \
Type 1 outline fonts and the 4 Courier Type 1 outline fonts for any purpose and without restriction; \
provided, that this notice is left intact on all copies of such fonts and that Bitstream's trademark is acknowledged as shown below on all unmodified copies of the 4 Charter Type 1 fonts. \
BITSTREAM CHARTER is a registered trademark of Bitstream Inc."));
}
} else {
createLabel(gridLayout, 3, DApplication::translate("FontDetailDailog", "Description")
, m_fontInfo->fontInfo.description);
Expand Down

0 comments on commit 75199e0

Please sign in to comment.