4

Continuing http://tex.stackexchange.com/a/662018, feeding

\documentclass{article}
\pagestyle{empty}
\usepackage{unicode-math}
\setmathfont{texgyretermes-math.otf}
\begin{document}
\[
  \begin{array}{|@{}l@{}|}
    L\\
    W\\
    X\\
    Y\\
    Z
  \end{array}
  \mskip6mu
  \begin{array}{|@{}l@{}|}
    _L\\
    _W\\
    _X\\
    _Y\\
    _Z
  \end{array}  
  \mskip6mu
  \begin{array}{|@{}l@{}|}
    _{^L}\\
    _{^W}\\
    _{^X}\\
    _{^Y}\\
    _{^Z}
  \end{array}  
\]
\end{document}

to {xe|lua}latex yields letters 𝐿, π‘Š, 𝑋, π‘Œ, and 𝑍 below one another in normal size, script and scriptscript:

output

As we see, π‘Š and π‘Œ are slightly moved to the right with respect to 𝐿, 𝑋, and 𝑍. Probably, π‘Š and π‘Œ are shifted to the right with respect to their bounding boxes.

Why? Is this a bug or intention? If this is a bug, what to do? I could probably try to move π‘Š and π‘Œ to the left with fontforge in a local copy of the font, but probably I'd break something while doing so. Thus, educated answers (e.g., on how to move them properly and adjust their width) are welcome…

For example, here is what is contained in the .sfd file for π‘Œ (U+1D44C) in its three variants:

StartChar: u1D44C
Encoding: 119884 119884 467
Width: 556
GlyphClass: 2
Flags: MW
ItalicCorrection: 105
TopAccentHorizontal: 362
HStem: 0 16<78 367 78 78> 637 16<91 330 91 330>
LayerCount: 2
Fore
SplineSet
633 637 m 1
 603 623 595 615 563 576 c 2
 344 306 l 1
 315 205 l 1
 309 185 l 2
 285 106 278 77 278 56 c 0
 278 31 292 21 331 19 c 2
 367 16 l 1
 367 0 l 1
 78 0 l 1
 78 16 l 1
 144 20 166 36 183 90 c 2
 244 302 l 1
 167 571 l 2
 150 626 147 629 91 637 c 1
 91 653 l 1
 330 653 l 1
 330 637 l 1
 270 631 258 626 258 601 c 0
 258 586 269 543 294 457 c 2
 325 347 l 1
 363 393 l 2
 468 515 513 579 513 606 c 0
 513 623 500 631 471 634 c 2
 444 637 l 1
 444 653 l 1
 633 653 l 1
 633 637 l 1
EndSplineSet
Validated: 1
AlternateSubs2: "'ssty' Script Style in Mathematical Alphanumeric Symbols lookup 2 subtable" u1D44C.st u1D44C.sts
AlternateSubs2: "'aalt' Access All Alternates in Mathematical Alphanumeric Symbols lookup 0 subtable" u1D44C.st u1D44C.sts
EndChar

…

StartChar: u1D44C.st
Encoding: 1114978 -1 1475
Width: 632
GlyphClass: 2
Flags: MW
ItalicCorrection: 102
TopAccentHorizontal: 398
HStem: 0 16<96 414 96 96> 637 16<110 373 110 373>
LayerCount: 2
Fore
SplineSet
706 637 m 1
 673 623 665 615 629 576 c 2
 388 306 l 1
 357 205 l 1
 350 185 l 2
 324 106 316 77 316 56 c 0
 316 31 331 21 374 19 c 2
 414 16 l 1
 414 0 l 1
 96 0 l 1
 96 16 l 1
 168 20 193 36 211 90 c 2
 278 302 l 1
 194 571 l 2
 175 626 172 629 110 637 c 1
 110 653 l 1
 373 653 l 1
 373 637 l 1
 307 631 294 626 294 601 c 0
 294 586 306 543 333 457 c 2
 368 347 l 1
 409 393 l 1
 525 515 574 579 574 606 c 0
 574 623 560 631 528 634 c 2
 498 637 l 1
 498 653 l 1
 706 653 l 1
 706 637 l 1
EndSplineSet
Validated: 1
EndChar

StartChar: u1D44C.sts
Encoding: 1114979 -1 1476
Width: 713
GlyphClass: 2
Flags: MW
ItalicCorrection: 101
TopAccentHorizontal: 438
HStem: 0 16<114 464 114 114> 637 16<130 419 130 419>
LayerCount: 2
Fore
SplineSet
786 637 m 1
 750 623 740 615 701 576 c 2
 436 306 l 1
 401 205 l 1
 394 185 l 2
 365 106 356 77 356 56 c 0
 356 31 373 21 421 19 c 2
 464 16 l 1
 464 0 l 1
 114 0 l 1
 114 16 l 1
 194 20 221 36 241 90 c 2
 315 302 l 1
 222 571 l 2
 202 626 198 629 130 637 c 1
 130 653 l 1
 419 653 l 1
 419 637 l 1
 347 631 332 626 332 601 c 0
 332 586 345 543 376 457 c 2
 413 347 l 1
 459 393 l 2
 586 515 641 579 641 606 c 0
 641 623 625 631 590 634 c 2
 557 637 l 1
 557 653 l 1
 786 653 l 1
 786 637 l 1
EndSplineSet
Validated: 1
EndChar

Though it could be sufficient to somehow change these values, I'm not an expert enough to move this properly, hint it properly, and to say whether anything else in the .sfd file depends on these glyphs and might need to be changed, too…

For the purpose of checking at least my actual usage of π‘Œ, here's my test file:

\documentclass{article}
\usepackage[textheight=20.1cm]{geometry}% the text height of 20.1 cm serves no other purpose than simply making the stuff fit on one page.
\pagestyle{empty}
\usepackage{unicode-math}
\setsansfont{TeX Gyre Heros}[Scale=0.88]
\setmonofont{TeX Gyre Cursor}%%% no explicit ligatures for the monospaced font.
\setmainfont[Ligatures=TeX]{TeX Gyre Termes}
\setmathfont[Ligatures=TeX]{TeX Gyre Termes Math}
\setmathfont[Ligatures=TeX,range={\setminus}]{Asana Math}
\begin{document}%
\begin{gather*}
f(Y)\\
\bigl(\mathrm{t}(Y)\bigr)\\
\forall\,\sigma\in Y\colon\\
\mathrm{G}[Y]\\
y\in \overbar{Y}_{\mathrm{fin}}\\
\uplambda\,Y\subseteq \itSigma.\,\text{some math term}\\
f\colon Y\to\mathop{\mathrm{dom}}g\\
\mathrm{V}(\varphi)\subseteq Y\subseteq X\\
(\text{some comma-separated list},X,Y)\\
Y=\{\text{some comma-separated list of elements}\}\\
f\colon \vec{X}\to \vec{Y}\\
(\itSigma\times\overbar{Y})\\
\overline{(Y_i)}\\
X_i \cap Y_i = \text{some set}\\
Y_1\cap Y_2 = \text{some set}\\
(X_1\cap Y_2)\\
(X_2\cap Y_1)\\
(X_1\setminus Y_2)\\
(X_2\setminus Y_1)\\
\mathsf{Dream}\,Y_n\\
\mathsf{Dream}\,Y_{n-1}\\
y_0\colon Y_0\\
y_1\colon Y_1\\
y_{n-1}\colon Y_{n-1}\\
y_n\colon Y_n\\
\{\text{some term}\mid x\in X \land y\in Y\}\\
\end{gather*}%
\begin{center}%
  … \(f\colon X\to Y\) between …\\
  … \(X\cup Y\) and …\\
  … \(X\cup Y\) begins …\\
  … arbitrary \(y\in Y\) satisfying …\\
  … each element \(y\in Y\).\\
  … set \(Y\) describes …\\
  … set \(Y\) of …\\
  … the names \(y_1,\dotsc,y_m \in Y\) are …\\
  The term \(X\to Y\) denotes …\\  
  … a function \(f\in X\to Y\), traditionally written as \(f\colon X\to Y\), is …\\  
  … the set \(Y\) describes …\\
  … the codomain of \(Y\).%
\end{center}%
\end{document}
2
  • Try to print $IX$, $IY$.
    – wipet
    Oct 17, 2022 at 17:49
  • @wipet I put them into tables for better visibility.
    – user282514
    Oct 17, 2022 at 18:39

1 Answer 1

4

Without asking the font designers, we can only guess. My guess is that they just took the boxes from the text italic font, and then played with italic corrections.

Comparison Latin modern and Termes

I'm sure one can construct examples where it comes out bad, but on the other hand, I think one should also ask oneself how these characters are used. Can one give "real" examples where it looks bad?

I have addes some of the examples you suggested. I think it is no disaster with the left sidebearing of the italic Y.

Some examples

3
  • Unfortunately, no direct example from me: today, I started a prior question (which you replied to) simply to measure the width of various symbols in maths very accurately. This, in turn, was needed to accurately draw a line of a suitable length above a symbol. So I don't need π‘Š and π‘Œ to look good in a mathematical context, but I rather need their widths to be precise.
    – user282514
    Oct 17, 2022 at 18:42
  • Since you asked for the context, I added a test file to the question. The usages look tolerable as of now, and they also need to look at least thus tolerable after the correction. I intentionally omitted \mskips present in the source because whichever distance hacks are there, they are adapted to the current π‘Œ. Another test file is, of course, the standard testmath.tex. Unfortunately, products of π‘Œ with anything are lacking for test purposes. Personally, I have not multiplied anything with π‘Œ so far; it seems that the creators of testmath.tex have not thought about it either.
    – user282514
    Oct 17, 2022 at 20:45
  • Except that right subscripts suck and except β€œπ‘‹βˆͺπ‘Œ begins”, where a bit of italics correction after π‘Œ would not hurt, it looks good. Moving π‘Œ to the left with fontforge and typesetting π‘‹π‘Œπ‘‹ would produce i.imgur.com/hT0qFeT.png (bad) instead of the original i.imgur.com/xAcCNcb.png (good). I see that π‘Œ is too much to the right in fontforge (and 𝑋 is probably normal) but I cannot explain why this had no bearing on the result, which comes out good. Can you explain this?
    – user282514
    Oct 19, 2022 at 17:20

You must log in to answer this question.