某些连字在chrome

时间:2017-07-31 13:11:35

标签: google-chrome unicode ligature

我注意到谷歌浏览器确实只显示某些字符作为连字。以下字体包含代码点,和。它还包含以下代码点序列的连字,。

包含代码点的序列不会在Google Chrome中显示为连字符:

@font-face {
  font-family: 'aliens';
  src: url('data:application/font-woff;base64,d09GRgABAAAAAAacAAsAAAAACZQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAEsAAABqILclk09TLzIAAAFUAAAAQQAAAFZWH2BrY21hcAAAAZgAAABXAAABfnxxBHdnbHlmAAAB8AAAApIAAANoA1dLDmhlYWQAAASEAAAAMQAAADYOUN7DaGhlYQAABLgAAAAbAAAAJAcKAydobXR4AAAE1AAAAA8AAAAYE4gAAGxvY2EAAATkAAAADgAAAA4C8AIQbWF4cAAABPQAAAAfAAAAIAEZAGBuYW1lAAAFFAAAAR0AAAHyFNvC+HBvc3QAAAY0AAAAZgAAAJG4ZoJgeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiCWAtNMDGwMPEBRJiCPFUiCaEYGZgCf2gWNAHicY2BkdmScwMDKwMBUxbSHgYGhB0IzPmAwZGQCijKwMjNgBQFprikMDv+BgFnhvwVDFLMCwwmgMCNIDgD5Mw02AAAAeJztkLENgDAQA+9JoEAMwBCUjEDFUEyXASgYJX1wLMbAr3vJlisDI5DEJjLESdB1KA3nidl5ZpUfdFJrxt2Y+LX475/Tds9tNA9RL9PXi1qMOi/Ojw9gAHicVVE7b9NQFL6Pxo7dxLETP5I0Nklcx3kU5+E4rkqavlQBrUAQHq1ahgraDm3hB9AFAQNIbAjUgYXSn4AyMTCgTh0YGVjY2GBkaF2ukxLSc33e9+j6fB9AgAjeR1tgBlwFAHJYEmW71pjCCk3RHNSzFnLqDVfnsB/WG3ZNlkRKFzVk11p4CrawC1vQNTlI4/cTWzcq4ZB8JZdM5qm8YuSum7EER2nSdvra8n1HKWbEeCIixcWIonLZuemm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ZSK1M7XZZGNdYcdOqinXPNcjrNxY9SU2GPFIZ/brGBRoEjSiSwV/4fxUxY73RaYY4Is6v+mv3aZxI4nhkzW5xZW5w4e0HXIafOmTGoSCt/t0uX3IZO43sHOin9CDt/q8ESU+78Xz7yr1e/MPVTYgAAAHicbcpBDkAwEIXhmaJCws5+4iajikmqbaj7XwURC4l/8RZfHih4quE/jQozzLFAjSX0K6fFXiOGHQ3BjbSbTWIiw1HSZdywE+tpDX5Pdmsjz5YmNuJnOmLFFDzd1n1urwKc/vsY7wAA');
}
td {
  font-family: 'aliens';
  letter-spacing: .000001em;
  font-variant-ligatures: contextual; 
  text-rendering: optimizeLegibility;
}
<table>
  <tr>
    <th>Symbol</th>
    <th>Description</th>
    <th>Does it work in Chrome?</th>
  </tr>
  <tr>
    <td></td><td>ALIEN MONSTER</td><td>✔️</td>
  </tr>
  <tr>
    <td></td><td>PAGE FACEING UP</td><td>✔️</td>
  </tr>
  <tr>
    <td></td><td>ALIEN MONSTER ON PAGE</td><td>✔️</td>
  </tr>
  <tr>
    <td></td><td>MATHEMATICAL BOLD SCRIPT CAPITAL A</td><td>✔️</td>
  </tr>
  <tr>
    <td></td><td>A ON PAGE</td><td>❌</td>
  </tr>
  <tr>
    <td></td><td>PAGE WITH A</td><td>❌</td>
  </tr>
</table>

预期结果(Safari): enter image description here

Chrome中的实际结果: enter image description here

Safari&amp; Firefox不显示序列。

包含代码点的连字是否无效? ligatureS可以包含任何代码点序列吗?这是chrome中的错误吗?

1 个答案:

答案 0 :(得分:1)

Chrome之所以不使用“ A ON PAGE”字样,是因为“ A”是“文本”和“ Page”,因此将“ A”和“ Page”分成了单独的运行是“表情符号”。另外,即使这样,“ A”和“ Page”似乎也将被视为不同的“单词”,但由于眨眼认为它可以逐字排列,因此将它们进一步分为不同的行。不幸的是,即使添加zwj似乎也无法解决这个问题。

请注意,我看到的是“ A ON PAGE”和关联的连字,但看不到字体中的“ PAGE WITH A”字形或连字,这可能解释了为什么Chrome和Safari都不显示此连字。

我已使用此信息针对issue开通了Chromium。