-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji support #10873
Comments
Maybe related to #6834 , 3 have better support of fonts with special characters. |
allow using them in code editor too like variables 🔨 |
@curly-brace well, if you manage to get a font with emoji in the format supported by the editor it should be possible (settings uses a |
You can now use any TTF font in the editor itself (code editor included) and in games, so this should work fine. If a TTF font contains glyphs and Godot doesn't render them, that needs to be investigated. |
Note that colored fonts aren't currently supported, though (this is important as most emoji fonts make use of colors). |
Is working in editor, labels, node names, gdscript, debugger, terminal output. Tested with https://github.com/eosrei/twemoji-color-font (of course, color does not work). |
I did not even know color fonts existed, I suppose we could detect this
somehow and render to color?
…On Mon, Jan 15, 2018 at 1:58 PM, eon-s ***@***.***> wrote:
Is working in editor, labels, node names, gdscript, debugger, terminal
output.
Tested with https://github.com/eosrei/twemoji-color-font (of course,
color does not work).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10873 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z2xlXISG7Dcfw-umuc_FmV6JfHmNzks5tK4OxgaJpZM4PKmOP>
.
|
I'm amazed, how are you detecting that the font needs to use a RGB texture
and raster to it?
…On Mon, Jan 15, 2018 at 9:45 PM, volzhs ***@***.***> wrote:
I'm trying on this.
I don't know why but it works only with Google Noto Emoji font... 😢
[image: screenshot from 2018-01-16 09-43-34]
<https://user-images.githubusercontent.com/8281454/34966795-d05abee0-faa1-11e7-8648-bbf41bf5a0f0.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10873 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z29pDTA5OX5FmojSWM4l7O4Ck6tQEks5tK_E0gaJpZM4PKmOP>
.
|
detecting color bool has_color = FT_HAS_COLOR(face);
int error = FT_Load_Char(face, p_char, has_color ? FT_LOAD_COLOR : FT_LOAD_DEFAULT); to raster case FT_PIXEL_MODE_BGRA:
wr[ofs + 2] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 0];
wr[ofs + 1] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 1];
wr[ofs + 0] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 2];
wr[ofs + 3] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 3];
break; need to take care of |
I'm not sure that fonts downloaded from internet is really colored font beside google noto color emoji... |
ah yeah, you need to find out if at least one of the chars uses color so
you create a color texture... either that or use a separate texture for
chars with colors, not sure.
…On Mon, Jan 15, 2018 at 10:33 PM, volzhs ***@***.***> wrote:
detecting color
bool has_color = FT_HAS_COLOR(face);int error = FT_Load_Char(face, p_char, has_color ? FT_LOAD_COLOR : FT_LOAD_DEFAULT);
to raster
case FT_PIXEL_MODE_BGRA:
wr[ofs + 2] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 0];
wr[ofs + 1] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 1];
wr[ofs + 0] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 2];
wr[ofs + 3] = slot->bitmap.buffer[i * slot->bitmap.pitch + (j << 2) + 3];
break;
need to take care of DynamicFontAtSize::textures though...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10873 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z28fKVYrp33ZvFSwnGQGrNahEQgTYks5tK_xjgaJpZM4PKmOP>
.
|
yeah. i've done that too so far. |
Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows, Godot 2.1.4
Issue description:
Godot does not render many emojis. I attempted to use a RichTextLabel containing the text:
te😊x🌐t🔼ᴥ♻🚀❂☮☯🚀🎡🚢🍭💦🔻
And instead what renders is:
I did this using a dynamic font for the node and I tried loading EmojiOneColor-SVGinOT.ttf, OpenSansEmoji.ttf, and unifont-10.0.06.ttf all with very limited success. The EmojiOneColor comes with a demo which, when opened in Chrome, renders just fine in B&W including many of the symbols I'm looking to use. Finding an adequate demo of the other fonts is a bit more difficult than I imagined.
The text was updated successfully, but these errors were encountered: