From b5a68720fd48925688afd52dcdafc14954a50fdc Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Tue, 29 Jun 2021 21:40:40 -0400 Subject: Emoji font settings for tags --- ui/fontsettings.h | 4 ++++ ui/render.h | 4 +++- ui/taglist.h | 2 +- ui/tagtypelist.h | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/fontsettings.h b/ui/fontsettings.h index ede68a24..7e54a28f 100644 --- a/ui/fontsettings.h +++ b/ui/fontsettings.h @@ -16,6 +16,10 @@ QFont BINARYNINJAUIAPI getDefaultMonospaceFont(); QFont BINARYNINJAUIAPI getMonospaceFont(QWidget* widget); void BINARYNINJAUIAPI setMonospaceFont(const QFont& font); +QFont BINARYNINJAUIAPI getDefaultEmojiFont(); +QFont BINARYNINJAUIAPI getEmojiFont(QWidget* widget); +void BINARYNINJAUIAPI setEmojiFont(const QFont& font); + int BINARYNINJAUIAPI getDefaultExtraFontSpacing(); int BINARYNINJAUIAPI getExtraFontSpacing(); void BINARYNINJAUIAPI setExtraFontSpacing(int spacing); diff --git a/ui/render.h b/ui/render.h index 5c05c4b6..5277f81f 100644 --- a/ui/render.h +++ b/ui/render.h @@ -39,7 +39,7 @@ struct BINARYNINJAUIAPI HexEditorHighlightState class BINARYNINJAUIAPI FontParameters { QWidget* m_owner; - QFont m_font; + QFont m_font, m_emojiFont; int m_baseline, m_charWidth, m_charHeight, m_charOffset; float m_fontScale; bool m_customFont; @@ -49,7 +49,9 @@ public: void update(); QFont& getFont() { return m_font; } + QFont& getEmojiFont() { return m_emojiFont; } void setFont(const QFont& font); + void setEmojiFont(const QFont& emojiFont); int getBaseline() const { return m_baseline; } int getWidth() const { return m_charWidth; } int getHeight() const { return m_charHeight; } diff --git a/ui/taglist.h b/ui/taglist.h index 19d163dd..924bc04d 100644 --- a/ui/taglist.h +++ b/ui/taglist.h @@ -69,7 +69,7 @@ class BINARYNINJAUIAPI TagItemDelegate: public QStyledItemDelegate Q_OBJECT protected: - QFont m_font; + QFont m_font, m_emojiFont; int m_baseline, m_charWidth, m_charHeight, m_charOffset; void initFont(); diff --git a/ui/tagtypelist.h b/ui/tagtypelist.h index 57521e65..5b692715 100644 --- a/ui/tagtypelist.h +++ b/ui/tagtypelist.h @@ -53,6 +53,7 @@ class BINARYNINJAUIAPI TagTypeItemDelegate: public QItemDelegate Q_OBJECT QFont m_font; + QFont m_emojiFont; int m_baseline, m_charWidth, m_charHeight, m_charOffset; void initFont(); -- cgit v1.3.1