Black colour glyphs

Is there a way to “keep” a glyph black? It seems that unless a glyph has a certain “level” of colour in it, the glyph is converted to a “normal” monochrome glyph which MacOS will invert to white when rendering text in night mode.

This glyph needs to remain black like some of the Apple emoji, like :heavy_check_mark::heavy_multiplication_x::ballot_box_with_check::heavy_plus_sign::end::black_medium_small_square:.

I’ve tried adding a single grey level but that’s not enough, I had to add not just a little colour, but a significant coloration before it would keep the colour.

So what’s the heuristic here that determines if the glyph is automatically converted to a “normal” non colour glyph?

Edit: Debugging progress ~>

So I’ve kept debugging this a bit more and the cutoff for adding red to an rgb colour before it “keeps” the colour in the glyph is 40. So R=40, G=0,B=0 is the blackest you can get a solid colour fill before it will switch to using standard monochrome font paths to build up the glyph.

Great question :slight_smile: By default, any glyph containing a Gradient color or RGB values that are all above 40 (85% black) will be considered colored glyphs. So you could either assign a gradient with two 100% black colors or a 15% dark grey.

It might be worth both documenting this, and adding an option for configuring it somewhere in a future version. It was frustrating to have to debug this and have to resort to cheap tricks, (my final solution was sticking a single red pixel behind the black layer) in order to get this to render correctly in the output fonts.

Got it. Adding this consideration to the todo list.