Le 02/12/2015 20:46, Jean-Marc Lasgouttes a écrit :
Le 02/12/2015 19:44, Guillaume Munch a écrit :
I just tested alpha 2.2 on Windows 10. I can reproduce the white square
issue even there. In fact it is worse than that: other symbols such as ✍
also display as a square (also ✀ I assume), and even the ¶ symbol, used
in the outliner for tracked changes, displays badly (as a black square).
This sounds like a serious issue, possibly an encoding issue given that
even a simple character such as ¶ is not displayed properly. Has it been
known to work in the past?
Don't know.
On Ubuntu 12.04, I imagine that the symbol is just not available. For
the latter, replacing ❎ with ✖ should solve the issue for now (or any
other suitable symbol of your suggestion). Shall I do that?
Please use the same cross that is used for the branch inset. It looks
like a good idea to have the same symbol in both places.
Good idea. I did not realise (although I knew...) that ✖ was already
used for branches. Here's a patch (more details in the commit log). ✖
(HEAVY MULTIPLICATION X) looks too heavy and ❌ (CROSS MARK) would be
better. If we knew it worked then we could replace the former by the latter.
Again, let's hope that qt 5.6 will do miracles. If there is a prerelease
packaged, it would be a good idea to try it now on Windows. It seems
overly optimistic to think that we'll just try it out at release time.
Now that we know that there was a bug in the source regarding the
pilcrow sign, we can imagine that font fallback works correctly in
Windows, and are back to the fact that in a fresh installation, in
Windows 10 (at least), characters such as ✀ and ✍ are not available. I
did not install latex at all, though. Is latex expected to install the
required fonts? Or is such a font missing in the installer? Or do we
accept this situation?
>From b72e3c498183a7baa1e02aab8f8843e0874ce86e Mon Sep 17 00:00:00 2001
From: Guillaume Munch <g...@lyx.org>
Date: Wed, 2 Dec 2015 21:56:10 +0000
Subject: [PATCH] Simplify Unicode symbols for old systems
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
(http://mid.gmane.org/565e17dd.7090...@clear.net.nz)
Fix the pilcrow and the cross in the outliner for Windows and old Ubuntus.
The thin space after the cross is based on aesthetics (in Ubuntu at least)
and is already used for display in BiblioInfo.cpp, so I presume it is safe.
Ideally, I prefer â (CROSS MARK), whose description fits the purpose, over â
(HEAVY MULTIPLICATION X), which looks too bold in the UI. Whereas â
(MULTIPLICATION X, successfully tested in Windows by Andrew) looks too dim, but
â (CROSS MARK) is next to â (NEGATIVE SQUARED CROSS MARK) so it might be as
problematic as the latter.
---
src/Changes.cpp | 11 ++++++-----
src/TocBackend.cpp | 8 +++-----
src/insets/InsetBranch.cpp | 6 ++++--
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/Changes.cpp b/src/Changes.cpp
index df4a376..b5f2429 100644
--- a/src/Changes.cpp
+++ b/src/Changes.cpp
@@ -486,19 +486,20 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer,
case Change::UNCHANGED:
continue;
case Change::DELETED:
- // 0x2702 is a scissors symbol in the Dingbats unicode group.
+ // â U+2702 BLACK SCISSORS
str.push_back(0x2702);
break;
case Change::INSERTED:
- // 0x270d is the hand writting symbol in the Dingbats unicode group.
- str.push_back(0x270d); break;
+ // â U+270D WRITING HAND
+ str.push_back(0x270d);
+ break;
}
dit.pos() = it->range.start;
Paragraph const & par = dit.paragraph();
str += " " + par.asString(it->range.start, min(par.size(), it->range.end));
if (it->range.end > par.size())
- // the end of paragraph symbol from the Punctuation group
- str.push_back(0x204B);
+ // ¶ U+00B6 PILCROW SIGN
+ str.push_back(0xb6);
docstring const & author = author_list.get(it->change.author).name();
Toc::iterator it = change_list->item(0, author);
if (it == change_list->end()) {
diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp
index 8e90a3b..e47ca9b 100644
--- a/src/TocBackend.cpp
+++ b/src/TocBackend.cpp
@@ -68,14 +68,12 @@ docstring const & TocItem::tooltip() const
docstring const TocItem::asString() const
{
- // U+2327 X IN A RECTANGLE BOX
- // char_type const cross = 0x2327;
- // U+274E NEGATIVE SQUARED CROSS MARK
- char_type const cross = 0x274e;
+ static char_type const cross = 0x2716; // â U+2716 HEAVY MULTIPLICATION X
+ static char_type const thin = 0x2009; // U+2009 THIN SPACE
docstring prefix;
if (!output_) {
prefix += cross;
- prefix += " ";
+ prefix += thin;
}
return prefix + str_;
}
diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index 5a278f9..6c78d44 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -84,6 +84,8 @@ docstring InsetBranch::toolTip(BufferView const & bv, int, int) const
docstring const InsetBranch::buttonLabel(BufferView const & bv) const
{
+ static char_type const tick = 0x2714; // â U+2714 HEAVY CHECK MARK
+ static char_type const cross = 0x2716; // â U+2716 HEAVY MULTIPLICATION X
docstring s = _("Branch: ") + params_.branch;
Buffer const & realbuffer = *buffer().masterBuffer();
BranchList const & branchlist = realbuffer.params().branchlist();
@@ -103,9 +105,9 @@ docstring const InsetBranch::buttonLabel(BufferView const & bv) const
}
bool const master_selected = isBranchSelected();
bool const child_selected = isBranchSelected(true);
- docstring symb = docstring(1, char_type(master_selected ? 0x2714 : 0x2716));
+ docstring symb = docstring(1, master_selected ? tick : cross);
if (inchild && master_selected != child_selected)
- symb += char_type(child_selected ? 0x2714 : 0x2716);
+ symb += child_selected ? tick : cross;
if (decoration() == InsetLayout::CLASSIC)
return symb + (isOpen(bv) ? s : getNewLabel(s));
else
--
2.1.4