stipub / stixfonts

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

U+2216 SET MINUS is too small? #179

Closed davidmjones closed 3 years ago

davidmjones commented 3 years ago

@pkra points out that U+2216 looks undersized. I would expect it to be the same size as U+2215 DIVISION SLASH, but reversed.

The official Unicode charts display the same difference in size between the example glyphs for the two characters; I suspect the original STIX design was based on the Unicode chart and never revised.

xsrvmy commented 3 years ago

Would this be just a problem in word (just guessing because Cambria Math doesn't have \setminus)? In LaTeX \setminus is mapped to the reverse solidus character, and \smallsetminus is mapped to 2216.

pkra commented 3 years ago

Would this be just a problem in word (just guessing because Cambria Math doesn't have \setminus)? In LaTeX \setminus is mapped to the reverse solidus character, and \smallsetminus is mapped to 2216.

Neither. This came up in web content.

tiroj commented 3 years ago

Investigating this further: the Math font contains two different glyphs for U+2216. The default (encoded) form /uni2216/ is a small one, vertically centred on the math alignment midline. The other is a variant /uni2216.var/ which has the same proportions as the division slash /uni2215/, as requested by @pkra — I think this must be a legacy from somewhere earlier in the life of the STIX fonts: in Cambria, our U+2216 glyph is large.

/uni2216.var/ is accessible via the Stylistic Set 14 (ss14) layout feature.

Note that the new ssty and ssty2 sets include scaling optical size variants for U+2216, but only for the current default, small form, not for the larger variant.

@davidmjones How should I proceed? I am wary about swapping the default and variant forms because that would reverse the display of any documents already using ss14 to access the larger form. I am thinking, though, that I should probably add ssty and ssty2 variants of the larger form.

davidmjones commented 3 years ago

I did a bit more digging. See the discussion at https://github.com/wspr/unicode-math/issues/181, especially @phst's comments of July 3, 2011, which which I basically agree.

I'm very much inclined to make the "large" set minus glyph the default mapping of U+2216 in STIX Two Math v2.12 and relegate the "small" version that is currently mapped to U+2216 to a character variant. It seems clear to me that the current mappings arose from a confusion between the Computer Modern \setminus (CMSY "6E) and the amssymb \smallsetminus (MSBM "72) characters in STIX 1.

In the unicode-math package, \setminus is mapped to U+29F5 REVERSE SOLIDUS OPERATOR and \smallsetminus is mapped to U+2216 SET MINUS. See the discussion in the unicode-math issue cited above.

Comparing various OpenType math fonts:

Loathe as I am to introduce incompatibilities, the current STIX Two MATH mapping and the cross-font incompatibilities in unicode-math strike me as indefensible. I say we fix it in STIX Two and then unicode-math can map \setminus to U+2216 and \smallsetminus can essentially become a synonym for \setminus, as it already is in other fonts. Until and unless Unicode standardizes the smallsetminus character in some form, I think that's the best that can be done.

Does anyone from the unicode-math side have a different opinion?

tiroj commented 3 years ago

To confirm: if we revise as you suggest, we would simply swap the two glyphs, so /uni2216/ becomes the larger form, and /uni2216.var/ becomes the smaller form, with the latter still mapped in the ss14 stylistic feature. I don’t think there are any knock-on dependencies in the font data, but would check kerning and MATH table to make sure.

doylemd commented 3 years ago

I agree with this general approach and the need to make this more consistent with expectations set by other fonts. I am wondering, though, whether these changes along with the changing width of the binary operators are sufficiently "different" from past versions of the font to warrant tagging these changes as 2.2 instead of 2.12 and then perhaps moving our planning for 2.2 to be about 2.3.

tiroj commented 3 years ago

I generally treat revisions to existing glyphs as minor-minor, and reserve minor revision updates for significant extensions of capability involving e.g. lots of new glyphs or changes of behaviour affecting large portions of the font. But up to STI Pub in this case.

tiroj commented 3 years ago

On the subject of versioning: If we exhaust minor version revisions for 2.xx, do we have STIX Two v3.xx, or do we have STIX Three? :)

davidmjones commented 3 years ago

To confirm: if we revise as you suggest, we would simply swap the two glyphs, so /uni2216/ becomes the larger form, and /uni2216.var/ becomes the smaller form,

Yes to this.

with the latter still mapped in the ss14 stylistic feature

I think it would be better to remove it from ss14 and put it in cv04.

BTW, I'm kind of confused about the other two mappings in ss14, but I don't want to think about them if I don't have to.

davidmjones commented 3 years ago

I am wondering, though, whether these changes along with the changing width of the binary operators are sufficiently "different" from past versions of the font to warrant tagging these changes as 2.2 instead of 2.12 and then perhaps moving our planning for 2.2 to be about 2.3.

That crossed my mind as well. I think it's marginal at present and I'm inclined to stick with 2.12, but I might change my mind once I catch up on how many operators are being affected.

davidmjones commented 3 years ago

On the subject of versioning: If we exhaust minor version revisions for 2.xx, do we have STIX Two v3.xx, or do we have STIX Three? :)

Don't make me come over there. :)

xsrvmy commented 3 years ago

Interesting issue about the unicode-math fonts situation: The \smallsetminus character in LM is still smaller than the regular set minus operator from regular latex. The latex setminus is just a backslash, so \mathbin{\backslash}

doylemd commented 3 years ago

Happy to differ to your judgment on the versioning David after you have a chance to look over the number and effects of the changes. Certainly don't want to slow us down or create unnecessary work.

tiroj commented 3 years ago

Fixed for v2.12:

a) Swapped glyphs and spacing for /uni2216/ and /uni2216.var/

b) Replaced /uni2216.ssty/ and /uni2216.ssty2/ with scaling optical versions of the new, larger U+2216 default form.

c) Added /uni2216.var.ssty/ and /uni2216.var.ssty2/ glyphs, and moved the existing smaller form versions to these locations.

d) Updated OpenType Layout project as follows: