stipub / stixfonts

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

Horizontal arrow construction #233

Open xsrvmy opened 2 years ago

xsrvmy commented 2 years ago

It looks like the horizontal arrows 20D6 and 20D7 have pre-rendered forms for shorter arrows. These arrows are used for vectors with multiple letters (like AB, etc.) and look really out of alignment in this form. Is there a reason a constructed version is not used at small sizes?

tiroj commented 2 years ago

I think this is something we addressed in the v2.20 update work, but we delivered that in December (I am awaiting test results from STI Pub).

Can you please provide a screenshot to show the issue you are describing?

xsrvmy commented 2 years ago

OP Note how short the arrow is.

tiroj commented 2 years ago

Thanks. I will investigate this. I recall we made some changes to horizontal assemblies in v2.20 work, but cannot remember the details or if the arrow heads might benefit from being longer to begin with.

xsrvmy commented 2 years ago

I' m pretty sure the standard behaviour in latex is not to used stepped sizes for arrows which is why this is weird in the first place.

firai commented 2 years ago

At least for pre-2.20, the issue isn't just that the horizontal accents need to be longer en masse, but rather how the accent width is being selected/calculated. As shown below, the base width seems to be rounded down to some increment when determining the accent width, for base widths less than a certain threshold. As such, the accent inevitably becomes too short for any base width that isn't evenly divisible by this increment. Above the threshold base width (towards the end of the end of the examples below), every increase in base width increases the width of the accent as expected. Is this stepping behavior because pre-constructed variants are being used up to a certain base width? In comparison, the accent width for other math fonts is directly proportional to the base width for all base widths.

I think the easiest way to see the issue interactively is in Word, where you can increase the width of the base in small increments using spaces or l's.

This comparison was produced using Word, but the behavior is similar in TeX.

image

Thanks. I will investigate this. I recall we made some changes to horizontal assemblies in v2.20 work, but cannot remember the details or if the arrow heads might benefit from being longer to begin with.

tiroj commented 2 years ago

Thanks @firai

Something quite odd seems to be happening with the length of the arrow relative to the letters in the STIX Two font, compared to the consistency of the other two fonts. I will compare how we handled this in STIX Two and Cambria, and try to make the former work more like the latter.

xsrvmy commented 2 years ago

@tiroj Pretty sure the source of the issue is that there are pre-constructed variants of these arrows up to a certain length