Emoji.Wpf
0.3.4
dotnet add package Emoji.Wpf --version 0.3.4
NuGet\Install-Package Emoji.Wpf -Version 0.3.4
<PackageReference Include="Emoji.Wpf" Version="0.3.4" />
paket add Emoji.Wpf --version 0.3.4
#r "nuget: Emoji.Wpf, 0.3.4"
// Install Emoji.Wpf as a Cake Addin #addin nuget:?package=Emoji.Wpf&version=0.3.4 // Install Emoji.Wpf as a Cake Tool #tool nuget:?package=Emoji.Wpf&version=0.3.4
Emoji.Wpf
Emoji.Wpf
adds Emoji rendering support to WPF applications.
Features
- Provides drop-in replacements for
TextBlock
andRichTextBox
, no additional code required. - Colour emoji! 😨 💩 🍰 ✈️ ✏️ 📞 ☘️
- Multiracial family emoji! 👩🏿👩🏻👦🏽 👨🏻👩🏿👧🏽👦🏽 👩🏻👶🏽
- Emoji for flags! <img src="https://github.com/samhocevar/emoji.wpf/raw/main/Resources/flags.png" height="24"/>
- Win11 style flags! <img src="https://github.com/samhocevar/emoji.wpf/raw/main/Resources/newflags.png" height="16"/>
- Full vector emoji! Render at huge sizes without quality loss.
- Optional support for subpixel antialiasing.
- Lightweight; does not embed a font or emoji images; just uses the system font.
- Works with old .NET versions such as .NET Framework 4.0.
- Can work on Windows 7 or Windows 8 by installing the Segoe UI Emoji font in
c:/Windows/Fonts
. - Free, opensource software, with no strings attached.
- Available as a Nuget package.
Available classes
Emoji.Wpf.TextBlock
: an emoji-aware version ofSystem.Windows.Controls.TextBlock
.Emoji.Wpf.RichTextBox
: an emoji-aware version ofSystem.Windows.Controls.RichTextBox
.Emoji.Wpf.Picker
: an emoji picker
Available dependency properties
Emoji.Image.Source
: attach to eitherSystem.Windows.Controls.Image
control orSystem.Windows.Media.DrawingImage
object in order to manipulate emoji images
Available runtime flags
bool Emoji.Wpf.EmojiData.EnableSubPixelRendering
: enable subpixel rendering, defaults tofalse
bool Emoji.Wpf.EmojiData.EnableWindowsStyleFlags
: enable flag rendering, defaults to autodetected
Examples
Here is how to use Emoji.Wpf in your XAML:
<Window ...
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
...>
<Window.Resources>
<DrawingImage x:Key="MyImageSource" emoji:Image.Source="👻"/>
</Window.Resources>
...
<emoji:RichTextBox FontSize="24" Margin="5"/>
...
<emoji:TextBlock FontSize="24" Text="Hello! 💖😁🐨🐱🐉👩🏿👩🏻👦🏽 lol"/>
...
<emoji:Picker FontSize="40"/>
...
<Image Source="{StaticResource MyImageSource}"/>
...
<Image emoji:Image.Source="🦑"/>
...
</Window>
More classes are to come, but feedback on what is needed is welcome.
Help needed!
I am not a very good WPF or even C# developer, but I think this could become a very useful and robust library if given enough care. Any help appreciated!
Version changelog
- v0.3.4 (2022/11/16):
- fix a crash in
emoji:RichTextBox
- fix multiple issues with drag-and-drop in
emoji:RichTextBox
- glyph colourisation is now done on the GPU
- new Windows 11 style flags on Windows 11
- fix a crash in
- v0.3.3 (2021/06/03):
- fix a crash on Windows 8
- fix flag rendering with the Twemoji font
- v0.3.1 (2021/06/02):
- allow to disable flag rendering
- v0.3.0 (2021/03/14):
- glyphs for flags!
- new
emoji:EmojiRendering
dependency property forFlowDocument
- optional subpixel glyph rendering
- experimental support for custom emoji sequences and custom glyphs
- v0.2.5 (2021/01/29):
- minor adjustments in
emoji:Picker
- minor adjustments in
- v0.2.4 (2021/01/28):
- new
emoji:Image.Source
dependency property forImage
andDrawingImage
objects, allowing to easily render emoji as icons
- new
- v0.2.3 (2021/01/27):
- the rendering pipeline now exclusively uses vector objects
- subpixel glyph positioning
- use
ColonSyntax="True"
inemoji:RichTextBox
for replace-as-you-type::koala:
becomes 🐨 etc.
- v0.2.2 (2021/01/25):
- increased picker performance through virtualisation
- rendering fallback for emoji ZWJ sequences
- v0.2.1 (2021/01/22):
emoji:RichTextBox.Text
is two-way bindable and binding defaults toLostFocus
- all base controls implement an
IEmojiControl
interface for convenience - fixed a warning caused by the Typography DLLs about
ExtensionAttribute
being redefined
- v0.2.0 (2021/01/17):
- support for undo/redo and numerous bugfixes in
emoji:RichTextBox
- minimal .NET version is now Framework 4.0 (was 3.0)
- support for undo/redo and numerous bugfixes in
- v0.1.8 (2021/01/13):
- composite emoji such as 🧔🏻 or 👨🏻🦰 now render properly in
emoji:RichTextBox
- new
Picked
event inemoji:Picker
- composite emoji such as 🧔🏻 or 👨🏻🦰 now render properly in
- v0.1.7 (2021/01/12):
- colour blending is off by default; use
ColorBlend="True"
to enable
- colour blending is off by default; use
- v0.1.6 (2021/01/11):
- add support for colour blending in
emoji:TextBlock
;useBlending="False"
to disable
- add support for colour blending in
- v0.1.4 (2020/11/23):
- add support for complex family emoji and mixed skin tone families
- v0.1.2 (2020/11/22):
- support hair style variation emoji
- fix kerning and positioning issues with family emoji
- v0.1.1 (2020/11/10):
- support wrapping in
emoji:TextBlock
- support wrapping in
- v0.1.0 (2020/11/9):
- first non-experimental release
How does it work?
Emoji.Wpf renders emoji as vector images, using the WPF text rendering engine. The geometry information is found in the Segoe UI Emoji font glyphs. The colour information is found in the same font, using Microsoft’s COLR/CPAL format extensions.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.1
- JeremyAnsel.HLSL.Targets (>= 1.0.13)
- Stfu (>= 0.1.1)
-
.NETFramework 4.0
- JeremyAnsel.HLSL.Targets (>= 1.0.13)
- Stfu (>= 0.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on Emoji.Wpf:
Repository | Stars |
---|---|
lay295/TwitchDownloader
Twitch VOD/Clip Downloader - Chat Download/Render/Replay
|
|
samhocevar/wincompose
🔣 Compose Key for Windows
|
|
CopyPlusPlus/CopyPlusPlus
让复制更加简单!
|
|
malaybaku/VMagicMirror
VRM Software for Windows to move avatar with minimal devices.
|
|
TeslaFly01/SmartSqlT
🔥🔥🔥 SmartSQL 是一款方便、快捷的数据库文档查询、导出工具!该工具从最初支持CHM文档格式开始,通过不断地探索开发、集思广益和不断改进,又陆续支持Word、Excel、PDF、Html、Xml、Json、MarkDown等文档格式的导出。同时支持SqlServer、MySql、PostgreSQL、SQLite等多种数据库的文档查询和导出功能。
|
Version | Downloads | Last updated |
---|---|---|
0.3.4 | 35,041 | 11/16/2022 |
0.3.3 | 87,480 | 6/3/2021 |
0.3.2 | 371 | 6/3/2021 |
0.3.1 | 393 | 6/2/2021 |
0.3.0 | 2,468 | 3/14/2021 |
0.2.5 | 2,231 | 1/29/2021 |
0.2.4 | 1,042 | 1/28/2021 |
0.2.3 | 175 | 1/27/2021 |
0.2.2 | 208 | 1/25/2021 |
0.2.1 | 257 | 1/22/2021 |
0.2.0 | 435 | 1/17/2021 |
0.1.8 | 455 | 1/13/2021 |
0.1.7 | 425 | 1/12/2021 |
0.1.6 | 389 | 1/12/2021 |
0.1.5 | 1,506 | 11/23/2020 |
0.1.4 | 491 | 11/23/2020 |
0.1.3 | 445 | 11/23/2020 |
0.1.2 | 464 | 11/22/2020 |
0.1.1.1 | 592 | 11/10/2020 |
0.1.1 | 455 | 11/10/2020 |
0.1.0 | 544 | 11/9/2020 |
0.0.19-experimental | 9,762 | 8/27/2019 |
0.0.18-experimental | 1,494 | 4/6/2019 |
0.0.17-experimental | 953 | 1/23/2019 |
0.0.16-experimental | 2,005 | 7/23/2018 |
0.0.15-experimental | 912 | 5/24/2018 |
0.0.14-experimental | 876 | 5/24/2018 |
0.0.13-experimental | 742 | 4/23/2018 |
0.0.12-experimental | 968 | 4/19/2018 |
0.0.11-experimental | 850 | 4/19/2018 |
0.0.10-experimental | 901 | 4/12/2018 |
0.0.9-experimental | 867 | 4/12/2018 |
0.0.8-experimental | 873 | 3/30/2018 |
0.0.7-experimental | 931 | 11/22/2017 |
0.0.6-experimental | 990 | 11/7/2017 |
0.0.5-experimental | 989 | 10/10/2017 |
0.0.4-experimental | 999 | 10/2/2017 |
0.0.3-experimental | 1,003 | 10/2/2017 |
0.0.2-experimental | 980 | 9/27/2017 |
0.0.1-experimental | 993 | 9/27/2017 |