|
|
#76 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,091
Karma: 7640000
Join Date: Nov 2009
Device: many
|
There are in fact open source svg library sets that include all emojis. According to a websearch:
Code:
Popular Open-Source Emoji SVG Libraries OpenMoji: An open-source project designed specifically for designers and developers, offering over 4,000 standardized vector emojis under a Creative Commons license. Twemoji (Twitter/X): Twitter's open-source emoji graphics are widely available as standalone SVG files and packages. Google Noto Emoji: Google's extensive emoji library provides vector paths supporting the entire Unicode standard. Microsoft Fluent Emoji: A 3D/flat open-source collection from Microsoft available in vector formats. svgmoji: A utility and wrapper library that tracks major open-source emoji sets and bundles them as scalable SVG sprites. Iconbuddy: A massive free icon aggregator that indexes thousands of open-source SVG emojis from Noto, OpenMoji, and Fluent. Calling images text, was a mistake by the Unicode standard in my opinion. It is like in the old days when zapf dingbats used glyphs to create images. Last edited by KevinH; Today at 09:01 AM. |
|
|
|
|
|
#77 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 721
Karma: 721246
Join Date: Dec 2017
Device: Kobo
|
Okay, understandable. I just wanted to raise the point to clear it out.
And your right, as soon as you start using non-standard characters, reader support becomes unreliable, especialy for emoji on which is it better to use SVG images inded. However, I would like to point out that emojis/images text did not just appear out of nowhere. Beyond a historical context surrounding japanese early-emojis, their main goal lies in the fact that they are, essentially, internationally standardized emoticons (ask a Japanese person how to make a happy face emoticon, not sure if you'll recognize it). Plus, text emoticons are very limited and can became too complexe to write, hence the advantage of using an image. So I’m willing to concede that there are a lot of emojis, and that it probably would have been better to create a parallel, complementary standard rather than "forcing" them in the standard in as is currently the case, but like many things with Unicode, the current implementation is due to historical compatibility reasons and convenience for a large scale usage on raw text level. But I became out-of-topic. Last edited by un_pogaz; Today at 09:30 AM. |
|
|
|
|
|
#78 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,091
Karma: 7640000
Join Date: Nov 2009
Device: many
|
The tweaks to SelectCharacter.cpp to support them are very minor. I will test to see just how doable it is on my Linux box. I would personally still use the svg emoji to standardize its appearance alone.
Last edited by KevinH; Today at 10:13 AM. |
|
|
|
|
|
#79 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,091
Karma: 7640000
Join Date: Nov 2009
Device: many
|
For example with the attached patch and changes to special_chars.xml you can work with multiple codepoint emojis (at least on my up-to-date KDE Plasma Manjaro Linux box).
Code:
<chargroup label="Emojis"> <cp hex="1F1E6 1F1F6" label="" desc="antartica flag"/> <cp hex="1F3F3 FE0F 200D 1F308" label="" desc="rainbow flag"/> </chargroup> Code:
diff --git a/src/Dialogs/SelectCharacter.cpp b/src/Dialogs/SelectCharacter.cpp
index 762472dc8..3b0b5bb73 100644
--- a/src/Dialogs/SelectCharacter.cpp
+++ b/src/Dialogs/SelectCharacter.cpp
@@ -124,11 +124,17 @@ void SelectCharacter::SetList()
QString hexcd = xml_reader.attributes().value("", "hex").toString();
QString label = xml_reader.attributes().value("", "label").toString();
QString desc = xml_reader.attributes().value("", "desc").toString();
- bool ok = false;
- char32_t codepoint = (char32_t) hexcd.toUInt(&ok, 16);
- if (!ok) continue;
- QString sval = QString::fromUcs4(&codepoint, 1);
- QString entity = "&#x" + hexcd + ";";
+ // handle the case of a space delimted hex string for multiple codepoints such as emojis
+ QStringList cplist = hexcd.split(' ', Qt::SkipEmptyParts);
+ QString sval;
+ QString entity;
+ foreach(QString cph, cplist) {
+ bool ok = false;
+ char32_t codepoint = (char32_t) cph.toUInt(&ok, 16);
+ if (!ok) continue;
+ sval += QString::fromUcs4(&codepoint, 1);
+ entity += "&#x" + cph + ";";
+ }
custom_characters << sval << label << entity << desc;
}
}
So this would be a very very easy change to push now if people are interested. |
|
|
|
|
|
#80 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,091
Karma: 7640000
Join Date: Nov 2009
Device: many
|
I am pretty sure all modern webkit/webengine based e-readers that are used for epub3 readers should handle this, but not sure if any of the dedicated e-reading hardware devices would. As far as I know based on a web search no Kindle hardware device would handle this. Nor would the latest Kobo e-reading hardware devices.
So this capability is probably a moot point. Last edited by KevinH; Today at 10:36 AM. |
|
|
|
|
|
#81 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,091
Karma: 7640000
Join Date: Nov 2009
Device: many
|
Quote:
Excellent job! Thank you! |
|
|
|
|
|
|
#82 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,629
Karma: 182340541
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
To simplify keeping my test builds links up to date, you can find the latest test build for Windows in the Downloading Sigil test builds for Windows thread.
This build included the multi-character entries in the special characters file. In my testing under Windows 11, the Antartica flag does not move from AQ to the system replacement but the rainbow flag does. Last edited by DNSB; Today at 07:31 PM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PageEdit 2.1.0 - Insert Special Character not working | BetterRed | Sigil | 0 | 05-17-2024 10:01 PM |
| Add title="" to h* based on existing TOC -- suggestion for new feature (or plugin?) | Mister L | Sigil | 82 | 09-11-2020 09:09 AM |
| "insert special character" in editor | rjwse@aol.com | Editor | 5 | 08-27-2019 08:31 PM |
| Insert special character: some niggles | Phssthpok | Editor | 2 | 11-19-2016 12:55 PM |
| Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |