找回密码
 快速注册
搜索
查看: 43|回复: 2

[MathML]数学字体 拉伸

[复制链接]

3147

主题

8384

回帖

6万

积分

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

积分
65372
QQ

显示全部楼层

hbghlyj 发表于 2022-5-18 04:18 |阅读模式
$\widehat X\hat X$
Firefox测试:
Screenshot 2022-05-17 at 20-46-51 测试.png
MathML:
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow data-mjx-texclass="ORD">
    <mover accent="false">
      <mi>X</mi>
      <mo>^</mo>
    </mover>
  </mrow>
  <mrow data-mjx-texclass="ORD">
    <mover accent="false">
      <mi>X</mi>
      <mo stretchy="false">^</mo>
    </mover>
  </mrow>
</math>

radar.oreilly.com/2013/11/mathml-forges-on.html
On the browser side, Gecko/Firefox supports stretchy constructions with Unicode characters in general and but for non-unicode components support is limited to STIX and Asana fonts (by hardcoding the PUA codepoints); see Mozilla’s documentation. WebKit/Safari only supports some stretchy constructions with Unicode characters.

TeX fonts demo

3147

主题

8384

回帖

6万

积分

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

积分
65372
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2022-5-18 04:40
github.com/stipub/stixfonts/
STIX Two Math implements the following font features:

ccmp    Glyph Composition/Decomposition
dtls    Dotless forms of i and j
flac    Flattened accents
ssty    Math Script style alternates

and the following Character Variants (note the different meaning of cv03 compared to the text fonts):

cv01    U+019B Lambda with horizontal, not slanted stroke -- latn only
cv02    U+0264 Rams horn with serifs -- latn only
cv03    Replace U+2205 EMPTY SET by an oblate form
cv04    Replace U+2216 SET MINUS by a smaller form

and the following Stylistic Sets (again, note that ss01 and ss02 have different meanings compared to the text fonts):

ss01    Stylistic Set 1 -- Math chancery to roundhand (\mathcal -> \mathscr)
ss02    Stylistic Set 2 -- Alternate italic forms: g, u, v, w, z
ss03    Stylistic Set 3 -- Horizontal crossbar variants
ss04    Stylistic Set 4 -- Minute, second and primes to long variants
ss05    Stylistic Set 5 -- Short arrow variants
ss06    Stylistic Set 6 -- Short/narrow variants
ss07    Stylistic Set 7 -- Alternate math symbols (product, summation, etc)
ss08    Stylistic Set 8 -- Upright integral variants; XITS compatible
ss09    Stylistic Set 9 -- Vertical slash variants; XITS compatible
ss10    Stylistic Set 10 -- Diagonal greater/lesser combination variants
ss11    Stylistic Set 11 -- Long slash not-equal combination variants
ss12    Stylistic Set 12 -- Low contrast (sans-like) variants
ss13    Stylistic Set 13 -- Horizontally flipped sine wave glyph
ss14    Stylistic Set 14 -- Tall variants
ss15    Stylistic Set 15 -- Slab serif symbol variants
ss16    Stylistic Set 16 -- Circled operator variants
ss20    Stylistic Set 20 -- Miscellaneous variants

Asana Math的README中可以找到:
The "Asana Math" OpenType font includes all mathematical symbols
included in the latest version of Unicode. It includes a MATH
table
, which is an extension to OpenType font technology, that
makes it possible to select glyphs for stretchy operators in a
not-so-font-specific manner. The font has been successfully tested
with XeTeX 0.99999 and Word 2007/2010/2016. It was constructed using
glyphs from the pxfonts of Young Ryu while many symbols were designed
by the author. The name  Asana (Ἀσάνα, Asána) is the name of the
mythological goddess Athena in the Doric dialect. The font is
finished (?), but it is quite possible that users may find bugs
and/or problems. Anyone who will find a bug or a problem, should
contact the author and report her findings.

*******************************************************************
NOTE: Ideally, the font should be installed systemwide. However,  *
the .TTC file should be installed only in Windows systems and it  *
is provided for people using FireFox, Word, etc. In addition, the *
.TTC file should not be included in a standard TeX installation.  *
On Unix or Unix-like system, an administrtor can install either   *
the .otf or the .TTC file in her system.         


Encoding MathFonts for Mozilla
Assumptions about fonts are not hard-coded at the core of the MathML engine. Even the set of stretchy characters is extensible externally. By following the scheme to be described later, it would be possible for you to setup additional fonts to be used to render MathML in Mozilla.
Besides, there is an underlying complication in mathematical typesetting with respect to the so-called stretchy characters. These are characters that can be rendered differently depending on their surrounding context. There is a one-to-many mapping between a stretchy character and its associated glyphshapes, and in fact, the final rendering of a stretchy character may require assembling several glyphshapes at once. Since Unicode only assigns one slot per character, the one-to-many relationship needs special handling by software. The extra glyphshapes are usually assigned to the PUA (the Unicode's Private Use Area 0xE000-0xF8FF which is exempted from receiving any official assignments and is left to applications for their internal use). These observations make it likely that mapping tables are still going to be around for some time -- at least until such a time where advanced built-in font technologies enable embedding the subtle and delicate mechanism of stretching math symbols within the font.

bugzilla.mozilla.org/show_bug.cgi?id=161137
⋯since TeX fonts are no longer the recommended fonts for mozilla 1.9

github.com/aliftype/xits
The main mission of XITS is to provide a version of STIX fonts enhanced with the OpenType MATH table, making it suitable for high quality mathematic typesetting with OpenType math-capable layout systems, like Microsoft Office 2007+, XeTeX and LuaTeX.

udn.realityripple.com/docs/Mozilla/MathML_Project/FontsMozilla2
The STIX Fonts Project has been developing a comprehensive set of fonts that cover all the symbols in MathML and also contains glyphs to stretch mathematical operators. They are available under the SIL Open Font License and should be installed for best MathML rendering. Note that currently, only the fonts in /Fonts/STIX-General/ are used for stretching mathematical operators with STIX fonts. Asana Math is also freely available under the SIL Open Font License and has good support for mathematical characters. Starting in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), Mozilla can also use the glyphs contained in that font for stretchy operators. Starting in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10), MathJax fonts are used as the default fonts for mathematical text and symbol stretching. These fonts are freely available under the Apache License. They are close to LaTeX rendering and should look more familiar to scientists. MathJax fonts also improves support for mathvariant attribute (e.g. to write double-struck, script or fraktur text).

www-archive.mozilla.org/projects/mathml/fonts/
通过修改pref.js可以让streched character使用Mathematica的字体:
  1. user_pref("font.mathfont-family", "Math1, Math2, Math4, Symbol");
复制代码

或者使用TeX的字体:
  1. user_pref("font.mathfont-family", "CMSY10, CMEX10, Symbol");
复制代码


fred-wang.github.io/MathFonts/
github.com/fred-wang/MathFonts
wiki.mozilla.org/MathML:Open_Type_MATH_Table
Support for Asana Math font in MathML


Fonts and Layout for Global Scripts



使用MathML的博客:
golem.ph.utexas.edu/~distler/blog/archives/000104.html
n-Category Café – TeXnical FAQ

3147

主题

8384

回帖

6万

积分

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

积分
65372
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2022-5-18 07:59

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

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

Powered by Discuz!

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