Use mask to make variable font, but [Can’t convert to compatible TrueType curves]

I tried to use the mask function by covering part of the font to achieve a variable font that can adjust the thickness.

The details of how I did it are: make a font with a full bold as background, make a mask with tiny width, and make the thinnest font. As the mask with the tiny width increase to cover the full bold background of the font, the weight can be changed.

For example, I’m working on “H”, where the background is a complete black square, and the tiny width mask covers the least of the background and makes the vertical lines on both sides extremely thick, while I change the mask to the widest and it will cover the entire background, thus making the vertical lines on both sides the smallest possible.

However, the “Can’t convert to compatible TrueType curves.” prompt keeps appearing and I can’t export the variable font file, or some fonts that don’t have the above prompt don’t change as much as I thought.

I have tried: clearing the excess anchors, confirming the order of the parts in the font, confirming the number of anchors for all parts of the font, and converting all paths to the TrueType curve in the path option on the top bar, resetting the initial points of the paths.

But with the above, some of the fonts achieved what I expected, but some did not, and it seems that there is no single way to solve all the problems.

So is my approach inherently infeasible, or are there some details I’m not aware of?

Why do you use a mask and not the outline directly? Can you seen a screenshot of your setup?

Here is the font A that I am working on with two masters.

I don’t know if this screenshot could give you enough detail on my work.

I’m sorry if I misunderstood but do you mean my font file setup or the setup of other things?

Masking is not a good idea. Because the (expanded) results of masking in different master layers will typically be incompatible outlines. And that is not possible in variable fonts.

OK, after all, I admit that masking is not a good idea. All in all, thank you very much for your answer. Looks like I’ll have to use other methods to achieve my plan.

Could you send me the font with the mask. I like to have a look what you tried.