表情符号修饰符使用Harfbuzz&的ZWJ序列Apple Color Emoji中的Freetype [英] Emoji modifiers & ZWJ sequences using Harfbuzz & Freetype in Apple Color Emoji

查看:426
本文介绍了表情符号修饰符使用Harfbuzz&的ZWJ序列Apple Color Emoji中的Freetype的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Freetype 1.9.1和Harfbuzz 1.7.6渲染可能包含表情符号的文本,但是我不知道如何正确渲染Apple Color Emoji中的表情符号修饰符和ZWJ序列( sbix 颜色字体)。

I'm using Freetype 1.9.1 and Harfbuzz 1.7.6 to render text possibly including emoji, however I don't know how to correctly render emoji modifiers and ZWJ sequencces from Apple Color Emoji (sbix color font).

我还尝试了Noto Color Emoji( CBDT / CBLC 颜色字体)和Segoe UI表情符号( COLR / CPAL 颜色字体),则呈现黑色&白色字形,但是似乎对COLR / CPAL的支持仅为是在Freetype中开发的,因此对我来说不是问题。

I've also tried Noto Color Emoji (CBDT/CBLC color font), which works as expected, and Segoe UI Emoji (COLR/CPAL color font), which renders black & white glyphs, however it seems that support for COLR/CPAL is just being developed in Freetype and therefore is not an issue for me.

任何人都可以找到所需的提示sbix字体?集群类型? Harfbuzz标志...?

Has anyone any tips on what to look out for with the sbix font? Cluster types? Harfbuzz flags...?

期望行为

苹果色表情符号-不好

Noto Color表情符号-确定

推荐答案

HarfBuzz逐渐改进了对不同序列的支持,现在可以使用了

HarfBuzz gradually improved different sequences support and now is reliable to be used for different Emoji modifiers and sequences.

此外,v2.1.0还通过简单的API简化了对所有可用Emoji文件格式的支持, https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-ot- color.h 当然,渲染部分仍将取决于您(或使用freetype进行渲染),但是您不必再处理字体结构了,至少简单易用的API, https://github.com /harfbuzz/harfbuzz/blob/1934652/src/main.cc#L46-L247 也是有关如何使用API​​的好例子。

Additionally, v2.1.0 added support to all of the available Emoji file formats with a simple and concise API, https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-ot-color.h of course rendering parts still will be up to you (or use freetype to render then) but you don't have to deal with font structures at least anymore given the simple to use API which https://github.com/harfbuzz/harfbuzz/blob/1934652/src/main.cc#L46-L247 is also a good example on how to use the APIs.

这篇关于表情符号修饰符使用Harfbuzz&的ZWJ序列Apple Color Emoji中的Freetype的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆