Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CFF2] Deprecate FontMatrix #156

Open
behdad opened this issue Oct 22, 2024 · 6 comments
Open

[CFF2] Deprecate FontMatrix #156

behdad opened this issue Oct 22, 2024 · 6 comments
Labels

Comments

@behdad
Copy link
Member

behdad commented Oct 22, 2024

According to the spec, FontMatrix operand be the identity matrix divided by font UPEM:

FontMatrix uses the reciprocal of unitsPerEm in a specific sequence of operands. For example, if unitsPerEm is 2000, having reciprocal 1/2000 = 0.0005, then FontMatrix must be set to 0.0005 0 0 0.0005 0 0. If unitsPerEm is equal to 1000, then the FontMatrix key may be omitted from the TopDICT.

It is redundant and useless. Just deprecate it. CFF2 is not a standalone font format.

@behdad behdad added the CFF2 label Oct 22, 2024
@skef
Copy link
Contributor

skef commented Oct 22, 2024

I'm not sure what relation this has to VARC purposes, given the almost-always-sufficient default value. The CFF2 FontMatrix is much more restrictive than the CFF FontMatrix, which suggests that someone thought about it and backed off to the current specification (from OpenType): "In the CFF2 table, however, only matrices with uniform horizontal and vertical scaling without translation are permitted, hence the requirement that the 1st and 4th operands be identical and the remaining operands be zero."

Rather than revisiting this could we maybe just require that it be the default when using CFF2 with VARC? (Otherwise I'd have to do some research to figure out why we ended up with this requirement.)

@behdad
Copy link
Member Author

behdad commented Oct 22, 2024

Humm. I'm not sure what this has to do with VARC. The spec makes the value of CFF2 FontMatrix is fully determined from the head.UnitesPerEM.

@skef
Copy link
Contributor

skef commented Oct 22, 2024

OK, so I guess the question is what the concern is. I could try to track down why things wound up this way in the spec, but (naively) it seems like any font designer can get the result you want by not using the operator. What are you worried about?

@behdad
Copy link
Member Author

behdad commented Oct 22, 2024

but (naively) it seems like any font designer can get the result you want by not using the operator.

I think the spec implies that if upem!=1000, then FontMatrix operator must be present. I like to remove that requirement. No strong opinion here though. I'm happy to close as well.

@skef
Copy link
Contributor

skef commented Oct 22, 2024

I see, you would prefer to unlink those two parameters.

@behdad
Copy link
Member Author

behdad commented Oct 22, 2024

I see, you would prefer to unlink those two parameters.

Yes, but also make sure there is wording that FontMatrix is ignored and UPEM used to scale glyphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants