[Tex/LaTex] the difference between the scalefnt and anyfontsize packages

comparisonfontsizepackages

What is the difference between the scalefnt and anyfontsize packages?

Even though I use scalefnt, I get font size substitutions of up to "2.30002pt" in a document I am currently editing. The documentation of anyfontsize states that it doesn't yet work with "pdfLaTeX + the EC fonts", but what does that mean? It doesn't work with either, or it just doesn't work with this combination? And what exactly are EC fonts?

(If this is relevant: I am using memoir, times, microtype, and many other packages.)

Best Answer

oops I googled for those packages and found I wrote one of them:(

The main difference between them is that they don't have anything in common.

scalefont does not affect the underlying font machinery at all it just does a \fontsize{}{}\selectfont command where the arguments of \fontsize are the specified factor of the current values. So it just asks for a font of a given size and whether you get font substitutions or not is unchanged.

anyfontsize redefines the low level font loading NFSS machinery in LaTeX so that any rule that tries to force fonts to a fixed list of predefined sizes is changed to use a rule that scales the nearest available declared font size to the requested size. The fixed font size rules made a lot more sense in the era when almost all fonts were bitmap format.

If you are using times or any other naturally scalable font setup I wouldn't have expected anyfontsize to have any affect as they are already scalable.