stipub / stixfonts

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

LaTeX \bar not centered over 'v' and 'w' #135

Open legendre6891 opened 5 years ago

legendre6891 commented 5 years ago

In the STIX2Math font, the math snippet $\bar v$ and $\bar w$ gives the following result, in which the vertical bar is not correctly centered.

image

jagd commented 5 years ago

\hat \tilde etc. have this issue, too

image

jagd commented 5 years ago

As stated in the title, it seems the italic v and w may be the most affected ones. Besides, the kerning of italic j could also be optimized.

image

juw commented 5 years ago

For \tilde{b} as for example used to write the supersymmetric partner of the bottom quark the tilde also seems to be placed to far to the right: MWE:

\documentclass{standalone}
\usepackage{mathtools}
\usepackage[math-style=ISO,bold-style=ISO]{unicode-math}
\setmainfont{STIX Two Text}[Numbers=OldStyle]
\setmathfont{STIX Two Math}[RawFeature=+cv03;+ss08]
\begin{document}
$\tilde{b}$
\end{document}

tildeb

jagd commented 5 years ago

My temporary solution is to remove the kerning of math accents, something like

\let\orghat\hat
\def\hat#1{\orghat{\kern0pt #1}}

also to \bar, \tilde etc. Then v, w, m, g and their bold variants are saved.

The math accents on the italic A and f would be non-optimum but acceptable.

image

jagd commented 5 years ago

Related issues (see unimath-symbols.pdf, the green color is STIX2)

image

image

image

tiroj commented 2 years ago

This has been left to last in the v2.20 MATH table revisions. I will try to address the most problematic / most obviously incorrect things this week, but in some cases there may be preferences regarding positioning to be discussed and addressed via future revisions, e.g. the comment above re. the tilde on the italic b: it is optically centered on the slant of the base character width, but perhaps users would prefer it over the ascender of the letter?

tiroj commented 2 years ago

I have been stepping through the Top Accent Attachment data in the MATH table, and I am not seeing anything that reflects the results shown in the screenshots in this issue. This is the positioning shown in the MS MATH table editor: image image image image

tiroj commented 2 years ago

Have been through entire Top Accent Attachment data in MATH table, making a few small adjustments, a couple of corrections, and adding the newest bold italic variants.

Closing this issue for now, but will re-open for re-testing when v2.20 is available. Interested to see comparison testing with other layout engines and platforms.

tiroj commented 2 years ago

Updated sources and fonts delivered to STI Pub for testing. Issue reopened pending public release.

Firestar-Reimu commented 1 year ago

I found this issue too on v2.13

Screenshot_20230323_212657

tiroj commented 1 year ago

?

The positioning of the marks as shown in that image are correct.

Firestar-Reimu commented 1 year ago

Sorry, but I prefer this style (from XITS, and TeX Gyre Termes Math is just like this)

Screenshot_20230324_233419

Or this from Lucida Bright Math OT

Screenshot_20230324_233322


For example, letters which have ascenders like b, d, h, k, should have the accents above the ascender (not the middle of the letter).

tiroj commented 1 year ago

This is in part a matter of taste, and there’s no consensus on the ‘correct’ way to position marks relative to ascenders and descender strokes. I’ve made fonts with one or other approach, informed by the intended use of the fonts, preference of particular user communities or clients, as well as by practical considerations. There is, apparently, some empirical evidence that optically centering the marks on the letter width is better for legibility. I’ll confer with @davidmjones and see whether any of the STI Pub members have an opinion on this.

Note that this question is distinct from the original issue.

Firestar-Reimu commented 3 months ago

For \tilde{b} as for example used to write the supersymmetric partner of the bottom quark the tilde also seems to be placed to far to the right: MWE:

image

Yes I have the same problem on \tilde{h}

the tilde is better to be on top of the ascenders.