emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Status of multicolor fonts?


From: YAMAMOTO Mitsuharu
Subject: Re: Status of multicolor fonts?
Date: Wed, 06 Jan 2016 12:51:29 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 16 Dec 2015 17:20:52 -0500, Cl9ment Pit--Claudel <address@hidden> 
>>>>> said:

>> 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.

According to the discussion about the inclusion of the Mac port, it
seems that this code should be removed from the mainline if we require
multicolor font implementations on free platforms first.  WDYT?

                                     YAMAMOTO Mitsuharu
                                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]