[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Status of multicolor fonts?
From: |
Clément Pit--Claudel |
Subject: |
Re: Status of multicolor fonts? |
Date: |
Wed, 16 Dec 2015 17:20:52 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 12/16/2015 09:10 AM, Eli Zaretskii wrote:
> The characters
> will be displayed on any platform, in their text representation, but
> AFAIK Emacs doesn't take color information from the font; the color is
> determined by the color attributes of the face. We also don't support
> emoji modifiers and emoji variation selectors.
Looking at the code in more detail suggests that it in fact does on Mac, in
macfont.m. The relevant bits of code were merged from Macport by Jab Djärv in
May of 2014:
macfont_info->color_bitmap_p = 0;
if (sym_traits & kCTFontTraitColorGlyphs)
macfont_info->color_bitmap_p = 1;
and further below
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if (macfont_info->color_bitmap_p
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
&& CTFontDrawGlyphs != NULL
#endif
)
{
if (len > 0)
{
CTFontDrawGlyphs (macfont_info->macfont, glyphs, positions,
len,
context);
}
}
else
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 */
{
CGContextSetFont (context, macfont_info->cgfont);
CGContextSetFontSize (context, font_size);
CGContextShowGlyphsAtPositions (context, glyphs, positions, len);
}
}
This seems to be using Apple-specific APIs, however, so it probably does not
help much for other platforms. Still, it would be nice to have similar features
on GNU/Linux. The patches that allowed this to function on MacOS were small; I
wonder if it would be the same on other platforms.
signature.asc
Description: OpenPGP digital signature
Re: Status of multicolor fonts?, Yuri Khan, 2015/12/16