mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
partial bitcoin-core/gui#79: Embed monospaced font
includes: - 89e421918ee8b9c8439317f747e5c37f0733d94b - 623de12d040af89ff7c25de6eb0a19c67179dc5f
This commit is contained in:
parent
722bd8d7f3
commit
7774bdb423
@ -31,6 +31,10 @@ Files: src/qt/res/icons/proxy.png
|
||||
Copyright: Cristian Mircea Messel
|
||||
License: public-domain
|
||||
|
||||
Files: src/qt/fonts/RobotoMono-Bold.ttf
|
||||
License: Apache-2.0
|
||||
Comment: Site: https://fonts.google.com/specimen/Roboto+Mono
|
||||
|
||||
|
||||
License: Expat
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@ -88,3 +92,14 @@ Comment:
|
||||
|
||||
License: public-domain
|
||||
This work is in the public domain.
|
||||
|
||||
License: Apache-2.0
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
@ -352,7 +352,8 @@ RES_FONTS = \
|
||||
qt/res/fonts/Montserrat/Montserrat-SemiBold.otf \
|
||||
qt/res/fonts/Montserrat/Montserrat-SemiBoldItalic.otf \
|
||||
qt/res/fonts/Montserrat/Montserrat-Thin.otf \
|
||||
qt/res/fonts/Montserrat/Montserrat-ThinItalic.otf
|
||||
qt/res/fonts/Montserrat/Montserrat-ThinItalic.otf \
|
||||
qt/res/fonts/RobotoMono-Bold.ttf
|
||||
|
||||
RES_ANIMATION = $(wildcard $(srcdir)/qt/res/animation/spinner-*.png)
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QFontDatabase>
|
||||
#include <QLatin1String>
|
||||
#include <QLibraryInfo>
|
||||
#include <QLocale>
|
||||
@ -576,6 +577,7 @@ int GuiMain(int argc, char* argv[])
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
|
||||
BitcoinApplication app;
|
||||
QFontDatabase::addApplicationFont(":/fonts/monospace");
|
||||
|
||||
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these
|
||||
// Command-line options take precedence:
|
||||
|
@ -36,6 +36,7 @@
|
||||
<file alias="Traditional">res/css/traditional.css</file>
|
||||
</qresource>
|
||||
<qresource prefix="/fonts">
|
||||
<file alias="monospace">res/fonts/RobotoMono-Bold.ttf</file>
|
||||
<file alias="Montserrat-Black">res/fonts/Montserrat/Montserrat-Black.otf</file>
|
||||
<file alias="Montserrat-BlackItalic">res/fonts/Montserrat/Montserrat-BlackItalic.otf</file>
|
||||
<file alias="Montserrat-Bold">res/fonts/Montserrat/Montserrat-Bold.otf</file>
|
||||
|
@ -260,8 +260,11 @@ QString dateTimeStr(qint64 nTime)
|
||||
return dateTimeStr(QDateTime::fromTime_t((qint32)nTime));
|
||||
}
|
||||
|
||||
QFont fixedPitchFont()
|
||||
QFont fixedPitchFont(bool use_embedded_font)
|
||||
{
|
||||
if (use_embedded_font) {
|
||||
return {"Roboto Mono"};
|
||||
}
|
||||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ namespace GUIUtil
|
||||
QString dateTimeStr(qint64 nTime);
|
||||
|
||||
// Return a monospace font
|
||||
QFont fixedPitchFont();
|
||||
QFont fixedPitchFont(bool use_embedded_font = false);
|
||||
|
||||
// Set up widget for address
|
||||
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent, bool fAllowURI = false);
|
||||
|
BIN
src/qt/res/fonts/RobotoMono-Bold.ttf
Normal file
BIN
src/qt/res/fonts/RobotoMono-Bold.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user