From 19b989f8e62f0f3cd2acc331bc03b8e2896285eb Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Thu, 8 Sep 2016 10:45:29 -0400 Subject: [PATCH] text: use a different invisible character for text embedding Contributes to the work of @temetherian in #170 --- CHANGELOG.md | 1 + lib/squib/graphics/text.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe17e9..382d486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Features: Bugs: * Fresh installs of Squib were broken due to two hidden dependencies, gio2 and gobject-introspection. (#172) +* Embedding icons in text show unicode placeholders on some OSs. This is a workaround until we get a better solution for embedding icons. See #170, #171, and #176. For that matter, see #103, #153, and #30 if you really want the whole story. ## v0.10.0 / 2016-05-06 diff --git a/lib/squib/graphics/text.rb b/lib/squib/graphics/text.rb index ff1b513..13cfd21 100644 --- a/lib/squib/graphics/text.rb +++ b/lib/squib/graphics/text.rb @@ -86,7 +86,7 @@ module Squib spacing = rule[:box].width[@index] * Pango::SCALE kindex = clean_str.index(key) kindex = clean_str[0..kindex].bytesize # byte index (bug #57) - str = str.sub(key, "\u0091\u0091\u0091") + str = str.sub(key, "\u2062\u2062\u2062") layout.markup = str clean_str = layout.text searches << { index: kindex, rule: rule }