# Feature request: an option in virtual master CP to calculate all required masters

Hi
virtual master is super cool, but for a simple variable font(masters are in only in both side of axes), when number of axes goes high, number of side per axes masters(1,2,4,8,…)+ zero master(0) grows very slower than all required masters, so required virtual masters grows very faster.

required side per axis masters + zero master = axes number+1
all required side axis masters = 2^number of axes

for a 5 axes variable font we need 5+1=6 masters, and 2^5=32 is all required masters, so required virtual masters are: 32-6=26 masters! setting all these virtual masters via cp is a little hard(and getting harder with higher axes numbers).

if an option exist in virtual master CP to calculate rest of required masters automatically, it would be very easy.

thanks.

You can adapt the code from this thread to calculate missing masters:

How many axis do you have?

I think you don’t need all those virtual masters.

All axis defile a space. Glyphs needs to know how far each axis goes. In most cases that is define by the normal masters. Only if you have axis where you only have brace layers, you need to add virtual masters. And you can use one virtual master for several axis. Use one for all the upper and one for all lower bounds.

i have five axes, masters are only on both side of axes(0 and 1 for per axes). let’s say with the numbers, it’s easy for me to understand. i have these main designed masters:

``````          [weight width height split roundness]
master 1: [0      0     0      0     0        ]
master 2: [0      0     0      0     1        ]
master 3: [0      0     0      1     0        ]
master 4: [0      0     1      0     0        ]
master 5: [0      1     0      0     0        ]
master 6: [1      0     0      0     0        ]
``````

with binary those are 0,1,2,4,8,16 and for the rest of masters defined virtual masters(3,5-7,9-15,17-31), so you say which numbers of them are enough?

thank you. I’ll check that(I’m a new Glyphs user and still not working with python api, need to study documents)

If I understand the diagram correctly you don’t need any virtual masters. All axis are defined in the range of 0–1.

1 Like

Virtual masters are useful in case where you have an axis like “Ascender Height”. Because you only need extra drawings for a handful of glyphs, you don’t like to add a full masters but you add some brace (intermediate) layers. And then you add a virtual masters to tell Glyphs the range of that axis.

1 Like

yes! it works without virtual masters thank you so much for clarify.