找回密码
 快速注册
搜索
查看: 39|回复: 1

[OpenType]italic correction

[复制链接]

3148

主题

8384

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65377
QQ

显示全部楼层

hbghlyj 发表于 2022-5-20 03:30 |阅读模式
本帖最后由 hbghlyj 于 2022-5-20 11:13 编辑 用FontForge打开STIX2Math.otf,查看∫(编码:U+222B)的信息,会发现有一个italic correction的值为230
1.png
U+2131的italic correction的值为55
1.png

latexref.xyz/_005c_002f.html
When you use \/, LaTeX takes the correction from the font metric file, scales it by any scaling that has been applied to the font, and then inserts that much horizontal space.

例如{\it f}\/H

w3c.github.io/mathml-core/#dfn-mathitalicscorrectioninfo
MathItalicsCorrectionInfo
    The subtable MATH.MathGlyphInfo.MathItalicsCorrectionInfo of italics correction values. Use the corresponding value in MATH.MathGlyphInfo.MathItalicsCorrectionInfo.italicsCorrection if there is one for the requested glyph or or 0 otherwise.


在3.1.1 Box Model中写道:
An optional italic correction which provides a measure of how much the text of a box is slanted along the inline axis. See Figure 2.

Figure 2中举了斜体的$f$和积分号$∫$为例子.


docs.microsoft.com/en-us/typography/opentype/spec/math
The MathItalicsCorrectionInfo table contains italics correction values for slanted glyphs used in math layout. The top portion of slanted glyphs may protrude beyond the glyph’s advance width. This can result in collision with other interacting elements, or an appearance in the placement of other interacting elements that is unpleasing unless some accommodation is made for the protrustion. The MathItalicsCorrectionInfo table provides correction values to accommodate for such protrusion.

The table consists of the following parts:

    Coverage of glyphs for which the italics correction values are provided. Italics correction is assumed to be zero for all other glyphs.
    Count of covered glyphs.
    Array of italic correction values for each covered glyph, in order of coverage. The italics correction value can be used as an adjustment for positioning of interacting elements to make allowance for protrusion to the right of the top part of the glyph. For example, taller letters tend to have larger italics correction, and a V will probably have larger italics correction than an L.

Italics correction can be used in the following situations:

    When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width.
    When positioning limits on an N-ary operator (e.g., integral sign), the horizontal position of the upper limit is moved to the right by ½ of the italics correction, while the position of the lower limit is moved to the left by the same distance.
    When positioning superscripts and subscripts, their default horizontal positions are also different by the amount of the italics correction of the preceding glyph.

image006[1].png

3148

主题

8384

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65377
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2022-5-20 03:53
http://www.randomservices.org/MathML/
The Content MathML version of this article requires the Firefox browser (which is available on the Windows, Mac, and Linux platforms), and will look best if the STIX fonts are also installed.

STIX支持一些OpenType特性,比如下图中f和i的连字(ligature):
Screenshot 2022-05-19 at 19-49-22 测试.png
n-Category Café将正文的字体设为STIX Two text,所有math标签的字体设为STIX Two
Screenshot 2022-05-19 at 19-49-22 测试.png

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 19:02

Powered by Discuz!

× 快速回复 返回顶部 返回列表