stipub / stixfonts

OpenType Unicode fonts for Scientific, Technical, and Mathematical texts
SIL Open Font License 1.1
730 stars 41 forks source link

The equal sign is wider than other binary operators #157

Closed xsrvmy closed 3 years ago

xsrvmy commented 4 years ago

I have yet to confirm this locally, but using the version on stix2 on Overleaf, the output of

\newlength\mathwidth
\setlength\mathwidth{\widthof{$a=b$}}
\the\mathwidth

\setlength\mathwidth{\widthof{$a\subset b$}}
\the\mathwidth

\setlength\mathwidth{\widthof{$a\subseteq b$}}
\the\mathwidth

\setlength\mathwidth{\widthof{$a<b$}}
\the\mathwidth

\setlength\mathwidth{\widthof{$a\le b$}}
\the\mathwidth

is

23.48602pt 23.29602pt 23.29602pt 23.29602pt 23.29602pt

indicating that the equal sign is too wide. This affects the alignment of the AMS align environment.

xsrvmy commented 4 years ago

Just opened a local copy of the otf file in fontforge. Can confirm this is a problem in version 2.00999. < and > has width 701, while = has width 720.

tiroj commented 4 years ago

I believe this is fixed in the most recent round of work we've been completing, but will check and confirm.

We've been adding additional ssty and ssty2 variant glyphs for super– and subscript positioning, and in the process spotted some discrepancies like this one and regularised widths.

xsrvmy commented 3 years ago

It seems like this is still an issue in 2.11. Is it going to be fixed soon?

tiroj commented 3 years ago

Sorry, because this issue wasn't flagged as a 2.10 work item (it was logged after those items were contracted), it slipped past my review. If we have cause to crack the sources again in the next little while, I will try to remember to address this, but it should definitely get flagged as a new item for the next round of work.

tiroj commented 3 years ago

I've checked this again, and I think the issue is actually that some of the other operators are too narrow. 720 units is the common width for most of the operators. The exceptions are /multiply /less /greater, which are narrower.

My thought is that the those three should be made wider to align with the common width. Yes?

davidmjones commented 3 years ago

That makes sense to me. Does this also apply to all of the related characters such as U++2264 LESS-THAN OR EQUAL TO, U+2265 GREATER-THAN OR EQUAL TO, etc.?

tiroj commented 3 years ago

I'll do a check of all the math operators. If their proportions lend themselves to a standard width, then I will make that 720 units (and ensure that the ssty and ssty2 variants are on their own standard widths).

tiroj commented 3 years ago

This is going to be a fairly extreme measure, affecting a lot of glyphs in the Math font. The common width of the basic arithmetic operators (plus, minus, equal, etc.) is 720 units, but almost all the other operators have a width of 701 (with corresponding mismatches between widths of ssty and ssty2 variants). I think the best approach will be to standardise all to 720 units, as this means we can retain the proportion and spacing of the most common, and not risk anything getting too cramped.

I will be adding 19 units to the width of all those operators that are currently 701 units (split between left and right sidebearings based on direction of sign).

tiroj commented 3 years ago

New default operator width = 720 New ssty operator width = 772 New ssty2 operator width = 800

tiroj commented 3 years ago

NOTE: this change for 2.12 currently applied only to Math font. Operators in the Text fonts are already of more varied width. @davidmjones can you review the Regular and Bold text fonts and confirm whether operator widths are okay or should be rationalised as in the Math font?