From 98187debfb6ab74d82725094894bac2cfb526fcb Mon Sep 17 00:00:00 2001
From: patrick96
Date: Mon, 6 Jan 2020 11:57:11 +0100
Subject: [PATCH] font: Show context in unmatched character warning
As suggested by @kronn.
This is a slightly modified patch introduced by @ayosec in their repo
for packaging polybar .deb packages.
Ref: https://github.com/ayosec/polybar-debian
Ref: https://github.com/ayosec/polybar-debian/blob/master/patches/0001-Show-full-contents-when-an-unmatched-character-is-fo.patch
---
include/cairo/context.hpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/cairo/context.hpp b/include/cairo/context.hpp
index f6ab233e..fe6706d2 100644
--- a/include/cairo/context.hpp
+++ b/include/cairo/context.hpp
@@ -1,6 +1,7 @@
#pragma once
#include
+
#include
#include
#include
@@ -218,7 +219,7 @@ namespace cairo {
char unicode[6]{'\0'};
utils::ucs4_to_utf8(unicode, chars.begin()->codepoint);
- m_log.warn("Dropping unmatched character %s (U+%04x)", unicode, chars.begin()->codepoint);
+ m_log.warn("Dropping unmatched character %s (U+%04x) in '%s'", unicode, chars.begin()->codepoint, t.contents);
utf8.erase(chars.begin()->offset, chars.begin()->length);
for (auto&& c : chars) {
c.offset -= chars.begin()->length;
@@ -353,6 +354,6 @@ namespace cairo {
std::deque> m_points;
int m_activegroups{0};
};
-}
+} // namespace cairo
POLYBAR_NS_END