This is probably a question that has been answered many times before. For some reason I cannot find the answer in the Asymptote manual or in StackExchange although I have searched diligently. I have trouble understanding why labels do not scale with picture size. If I write the following code,
picture pic1;
size(pic1,40);
path box = (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle ;
pair center = (0.5,0.5);
draw(pic1,box);
label(pic1,"M",center);
picture pic2;
size(pic2,20);
draw(pic2,box);
label(pic2,"M",center);
add(pic1.fit(),(0,0),W);
add(pic2.fit(),(0,0),E);
then although the box
is the same size in both pictures it will scale with the picture size.
The font which is 12pt does not. I can scale it manually by multiplying the label with a
scale()
transform but I cannot find anything in the documentation that would make the label scale automatically with the picture size. Any ideas?