Issue with .tosf

Hello, I’m finishing two distinct fonts that have the same number of glyphs and features. With one I have no problems when changing from .osf to .tosf, but with the other that’s impossible, unless I remove the .lf from the font (because from the code is not enough). Can you please help? Here’s a pic of the features:

the one on the left is giving the issues.

What feature is that?

What number sets do you have in the font. How do your default numbers look?

Hi Georg, In both cases is the onum feature.

This one performs perfectly:

Why do you have “.lf” and “.tf” variants if the defaults are either of the two?

Never thought of that as a problem. We’ve created personalised categories for all our fonts and we usually fill those, even when they’re the same. This means that a monospaced font will have both tabular figures and default figures, even when there’s no difference between them.

Is that a problem?

The feature code generator needs to determine the kind of the default numbers. One way is to check what number sets you have. Normally you have three extra sets, so the default is the missing one. If that fails, it applies heuristics (measuring width and height of some numbers). But I think I didn’t test the case with four extra number sets. So it probably gets confused.

I would suggest to just keep the numbers that are actually needed. That saves space and time.

So you think that the .lf should never exist?

If your default numbers are .lf, don’t add an extra .lf set.

I understand that. Never thought was reasonable to have duplicate sets yet, in most cases that’s not an issue, except when the .osf and .tosf are exactly the same (like in a monospace). Anyway, I will delete the .lf in this font. Thanks for the feedback.

For monospaced font you only ever need one set of alternate numbers. You either need “.osf” or “.tf” (depending on your default numbers). I added that you can use “.lf”, too.