How to make a transparent Glyph

I am trying to build an app to read the Hebrew Bible.
The Hebrew letters are punctuated with trope accents and vowels.
I would like to show letters in black, trope accents in red, and vowels in blue.

To achieve this, I was think of absolutely positioning each word twice over on itself.

<span class="allChars" dir="rtl" style="color: black">בְּﬞאֶ֖רֶץ</span>
   <span class="allTropes" dir="rtl" style="color: green">בְּﬞאֶ֖רֶץ</span>
   <span class="allVowles" dir="rtl" style="color: blue">בְּﬞאֶ֖רֶץ</span>

Each class [allChars, allTropes, and allVowles] would then correlate to a different font.
And each font would be a bastardized version of the original font.
allChars would have all transparent glyphs except for letters.
allTropes would have all transparent glyphs except for trope marks.
allVowles would have all transparent glyphs except for vowel marks.

This is the link to the font I would like to adulterate:

Two questions:

  • Is this a valid approach to this problem?
  • How would I go about altering the font to create the three child fonts? I am new to this tool.


I don’t think coloring marks differently will work as the <span> is breaking the Opentype layout and the marks will not be positioned correctly.

But you can build a color font that has the colors baked in: Creating a Microsoft color font (CPAL/COLR) | Glyphs

I don’t know that I have the skillset to build a brand new font.
I just want to take the existing font and modify it.
Is that possible?
How do I make the glyphs transparent?

I believe that only FireFox can change the color of marks separately from the base glyph.

That depends on the license of the font.

A color font like in the link above can have differently colored shapes in the same glyph, thus you do not need transparent glyphs.

I’m still very lost.
I was able to duplicate the Regular layer with a Color layer.
But how do I get the Color layer to show any color? It looks just like the Master Regular layer:

Is there a preview somewhere?
Can I enter free text and see what it looks like?

Basically, I want the little dot inside the letter to be blue.
The letter should remain black

Make one layer with just the base shape and assign it the * color. Then add another layer with only the dot and assign the blue color.

Conceptually I understand the idea but the mechanics are lost on me.

As you can see, I have both shapes on both layers.
But why is it NOT appearing in blue above? Both shapes are gray above.
I am already on “Color 2” layer - it is selected in the image above - and you can see the blue dot all the way on the right of the layer title.
And yet the dot appears to be greyed out and NOT blue (again - up above in the screenshot)

So how can I tell if it’s working?
Is there a preview somewhere?

You should see a colourized preview in the Font view:
Screenshot 2021-12-02 at 10.12.25

I think you have to set up the color layers in the base glyph, the mark glyph, and the combined glyph for it to work, see attached demo font.

Color (3.1 KB)

Great stuff!

I think I got the hang of it. From the Font tab I can double click on any character and it opens up a second tab where I can make the edits to that character. I can see the preview when I navigate back to the Font tab.

But now when I try to export the font to TTF I see the following error:

Could you kindly advise?
I would upload the Glyphs file on here but when I try to do so I see this error: “Sorry, new users can not upload attachments.” Is that really necessary?

The error is in the ccmp feature. Select it in the sidebar (it is marked with a red sign) and check its looksups.

Thank Florian. Where is the sidebar? I don’t see a red sign anywhere:

Kindly advise. Thanks!

In the Font Info window:

OK so I clicked on the red exclamation icon:

Now how do I resolve the error?
What does it mean to “check its looksups” ?

In the lookup SUB_26 block, the first two rules are of the type many-to-one (also know as a Ligature Substitution, there are multiple glyph names before the by and one name after the by) and the third rule is one-to-one (one glyph name before and after the by). Rule types cannot be mixed in a single lookup.

You can split the code into two separate looksup. So, instead of the lookup SUB_26 { … } SUB_26; code, write the following:

lookup SUB_26_A {
    sub upperdot upperdot by hebrewthousand;
    sub dotaccentcomb dotaccentcomb by hebrewthousand;
} SUB_26_A;
lookup SUB_26_B {
    sub dieresisnosp by hebrewthousand;
} SUB_26_B;

Side note: it appears like you opened an OTF/TTF font file. Can you tell us the name of that font so that we can investigate whether there was an issue with the imported feature code?

Awesome! It totally works now:

You can download the font here: Ezra SIL SR font

If you would like I can also send my Glyphs file - but I’m not able to upload it here

1 Like

I have noticed that when trying to print the page - the accent colors are lost and the Regular glyph is used.
Please visit and click the Print button to reproduce the bug.

Is there a way to conserve the font color of the accents when printing?

That is a bug with the app you are printing from.

Why is it a bug in my app?
You don’t have to use the print button in the app if you don’t trust it.

Just go to File->Print in your browser - and you will see that the font is missing in the preview:

Can you please advise as to why the color font isn’t showing up in the print preview?

It depends on the app you are using. Not every app supports CPAL/COLR. Chrome does not, AFAIR.

I’m not sure I understand. My app can show CPAL/COLR without any problem at all. The issue is only when trying to print - in the preview I can see that the font color is lost.

What is looks like in the print preview:

But in the app the font colors show up just fine.

Why is printing affected and why is the font color lost when trying to print?