latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
245 stars 29 forks source link

Dynamic ScaleAgain without loops #517

Open RuixiZhang42 opened 5 years ago

RuixiZhang42 commented 5 years ago

It was mentioned here that for smaller Scales we could apply “rougher” ScaleAgains, but for larger Scales we might want to apply “finer” ScaleAgains.

One could hard-code the following dynamic ScaleAgains to get more accurate fontdimen’s, without using loops:

ScaleAgains Scale coverage
1.0001 and 0.9999 0.152587890625000000 and up
1.00009 and 0.99991 0.169542100694444444 and up
1.00008 and 0.99992 0.190734863281250000 and up
1.00007 and 0.99993 0.217982700892857143 and up
1.00006 and 0.99994 0.254313151041666667 and up
1.00005 and 0.99995 0.305175781250000000 and up
1.00004 and 0.99996 0.381469726562500000 and up
1.00003 and 0.99997 0.508626302083333333 and up
1.00002 and 0.99998 0.762939453125000000 and up
1.00001 and 0.99999 1.525878906250000000 and up

Looking at my calculations, I incline to suggest that “fixed” ScaleAgain at 1.00005 and 0.99995 already cover reasonable usage. Actually, if we assume that no user will ever scale math font at 60% or lower, we could just use ScaleAgain at 1.00003 and 0.99997.