Emoji Unicode codepoint support #68225

Closed
opened 2019-08-04 16:39:46 +02:00 by Bernd Günther · 14 comments

Hi,

in a text object I tried to insert some unicode codepoints from the Emoji section (e.g. this one: https://emojipedia.org/grinning-face/, codepoint=? U+1F600). I used the font Segoe UI Symbol (I'm on windows 10) for the text object. The grinning face is for sure in that font, but in blender there is always a rectangle displayed!
I tired the copy and paste method and a scripting method with bpy.data.objects["demo"].data.body = "\U0001F600" (my textobject ist named "demo", but bothe results to the same rectangle.

My guessing is that Blender is not able to process unicode codepoints above hex FFFF, but this is only guessing

Bernd

Hi, in a text object I tried to insert some unicode codepoints from the Emoji section (e.g. this one: https://emojipedia.org/grinning-face/, codepoint=? U+1F600). I used the font Segoe UI Symbol (I'm on windows 10) for the text object. The grinning face is for sure in that font, but in blender there is always a rectangle displayed! I tired the copy and paste method and a scripting method with bpy.data.objects["demo"].data.body = "\U0001F600" (my textobject ist named "demo", but bothe results to the same rectangle. My guessing is that Blender is not able to process unicode codepoints above hex FFFF, but this is only guessing Bernd
Author

Added subscriber: @bguenthe

Added subscriber: @bguenthe
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

I used the font Segoe UI Symbol (I'm on windows 10) for the text object. The grinning face is for sure in that font

Actually you can't assume that, just because you can enter that color emoji character while having that font selected in other applications. That font is a monochrome Truetype font (black-strokes and a maximum of 65,536 glyphs). So when you see a color emoji that is because the operating system is doing a fallback from that font to another that supports color emojis. So "Segoe UI" does not include that character and we can't really do the same fallback trick of substituting a different font because our font drawing library does not (yet) support color fonts well.

But there are regular (monochrome) characters in the regular unicode range that include smiling faces. Notably U+263A, which is 'WHITE SMILING FACE', but the Segoe UI does not include that symbol. But other fonts do. Following is in in Arial, which includes that glyph:

SimilingFace.png

> I used the font Segoe UI Symbol (I'm on windows 10) for the text object. The grinning face is for sure in that font Actually you can't assume that, just because you can enter that color emoji character while having that font selected in other applications. That font is a monochrome Truetype font (black-strokes and a maximum of 65,536 glyphs). So when you see a color emoji that is because the operating system is doing a fallback from that font to another that supports color emojis. So "Segoe UI" does not include that character and we can't really do the same fallback trick of substituting a different font because our font drawing library does not (yet) support color fonts well. But there are regular (monochrome) characters in the regular unicode range that include smiling faces. Notably U+263A, which is 'WHITE SMILING FACE', **but the Segoe UI does not include that symbol**. But other fonts do. Following is in in Arial, which includes that glyph: ![SimilingFace.png](https://archive.blender.org/developer/F7649107/SimilingFace.png)
Author

Hi harley,

sorry for misleading you! You are right, this is a color emoji. But if you copy that codepoint and paste it in wordpad on windows it will be shown in monochrome image.png and the choosen font is shown also. According to https://www.fileformat.info/info/unicode/char/1f600/fontsupport.htm image.png the grinning face in in the Segoe UI Symbol and in the Segoe UI Symbol fonts (both available on windows 10)

The symbol from your picture is a smiley not a grinning face!

There are also a lot more emojies available. They have all in common that there codepoint is above hex FFFF, so they do not fin in 16 bit. In python you have to use the upper U escape sequence instead of the lower u. For example print("\U0001F600"). You can excecute that on the commandline if you have the correct font installed. I tried this python3 in putty on my little raspberry server. It's not working an the windows commandline.

Hi harley, sorry for misleading you! You are right, this is a color emoji. But if you copy that codepoint and paste it in wordpad on windows it will be shown in monochrome ![image.png](https://archive.blender.org/developer/F7649971/image.png) and the choosen font is shown also. According to https://www.fileformat.info/info/unicode/char/1f600/fontsupport.htm ![image.png](https://archive.blender.org/developer/F7649973/image.png) the grinning face in in the Segoe UI Symbol and in the Segoe UI Symbol fonts (both available on windows 10) The symbol from your picture is a smiley not a grinning face! There are also a lot more emojies available. They have all in common that there codepoint is above hex FFFF, so they do not fin in 16 bit. In python you have to use the upper U escape sequence instead of the lower u. For example print("\U0001F600"). You can excecute that on the commandline if you have the correct font installed. I tried this python3 in putty on my little raspberry server. It's not working an the windows commandline.
Member

Hmmm... Sorry, but I was looking inside the "Segoe UI" font not "Segoe UI Symbol". Not sure how I missed that part of your post.

I'm quite certain that our font library (FreeType) properly supports glyps above FFFFF just fine, so would suspect that there is indeed something in our code keeping those characters from displaying. Although I doubt anyone would take up support for emojis within blender as an urgent issue, I'd guess this will get fixed before too long for other reasons. There are some plans to support font-shaping (using Harfbuzz for example) to support some complex languages better and quite often many of the combined characters are above FFFFF.

I personally would not consider the current behavior as a bug though as we currently support the vast majority of glyphs for most languages. Anything more would be nice, but that's more of a feature request.

Hmmm... Sorry, but I was looking inside the "Segoe UI" font not "Segoe UI Symbol". Not sure how I missed that part of your post. I'm quite certain that our font library (FreeType) properly supports glyps above FFFFF just fine, so would suspect that there is indeed something in our code keeping those characters from displaying. Although I doubt anyone would take up support for emojis within blender as an urgent issue, I'd guess this will get fixed before too long for other reasons. There are some plans to support font-shaping (using Harfbuzz for example) to support some complex languages better and quite often many of the combined characters are above FFFFF. I personally would not consider the current behavior as a bug though as we currently support the vast majority of glyphs for most languages. Anything more would be nice, but that's more of a feature request.
Author

That's pretty fine for me. Can you change this or do I have do do this?

That's pretty fine for me. Can you change this or do I have do do this?

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Please follow our submission template and guidelines and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc.

A guideline for making a good bug report can be found here: https://wiki.blender.org/wiki/Process/Bug_Reports

Marking as "Incomplete" until the requested information/data is provided.

Please follow our submission template and guidelines and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc. A guideline for making a good bug report can be found here: https://wiki.blender.org/wiki/Process/Bug_Reports Marking as "Incomplete" until the requested information/data is provided.
Author

Here is a blend file demonstrating the bug unicode_bug.blend

Here is the system-info.txt file system-info.txt

Here is a blend file demonstrating the bug [unicode_bug.blend](https://archive.blender.org/developer/F7657344/unicode_bug.blend) Here is the system-info.txt file [system-info.txt](https://archive.blender.org/developer/F7657343/system-info.txt)
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Seems to work just fine for me:
image.png

Note, I had to select a different font file, but it should be the same font.
So maybe you use some incomplete font file?

Seems to work just fine for me: ![image.png](https://archive.blender.org/developer/F7679885/image.png) Note, I had to select a different font file, but it should be the same font. So maybe you use some incomplete font file?

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2019-09-02 19:09:48 +02:00

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#68225
No description provided.