Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现 Google Fonts 在悄悄为中英混排努力 #17

Open
reuixiy opened this issue Dec 7, 2019 · 3 comments
Open

发现 Google Fonts 在悄悄为中英混排努力 #17

reuixiy opened this issue Dec 7, 2019 · 3 comments
Labels
Notes 一些日常笔记

Comments

@reuixiy
Copy link
Owner

reuixiy commented Dec 7, 2019

2019-12-07-14-08-31

刚刚测试了一下,发现 Google Fonts 好像在解决中英混排的问题。

我的测试如上图,发现将 Noto Serif SC 放于首位时,显示的 ‘’ 居然变成了半角,后来由渲染信息得知应该是直接移除了这两个字符,然后使它回退到了我的谷歌浏览器默认的 Serif 字体 Adobe Garamond(上图为我自行在其后面添加了一个网络英文字体,保险起见,不然万一用户设置的是一个中文字体),进而变成了半角;还发现奇怪的 …… 的行为,当它左边为中文时,位置在中间,当它左边为英文时,位置在底部。不过这不能解决左边是 右边是中文的问题,如测试所示。

这很奇怪,因为这采用了两种不同的方法,有两个疑惑:

  1. 后面这种方法我不知到是如何通过纯 CSS 实现的,但如果你能够做到根据左右字符范围控制样式,那么为什么不采用这种方法处理 ‘’ 而去直接移除……
  2. 如果你的假设前提是中文内容抛弃弯引号采用直角引号,那么你为什么还要将 “” 显示为全角呢……

不管怎样,对于网页中英混排,如果中文内容不抛弃弯引号,那肯定是没办法去解决我测试中的最后一个省略号的问题;如果中文内容抛弃弯引号的话,那么你直接将弯引号全部设计成半角,然后保持处理省略号的方法,Google Fonts 就完美解决了网页上中英混排的这两个问题。

当然,对于省略号,我的解决方法还是人工手动控制——英文直接用三个点 ...,中文则用标准的 ……

@reuixiy reuixiy added the Notes 一些日常笔记 label Dec 7, 2019
@reuixiy
Copy link
Owner Author

reuixiy commented Dec 7, 2019

P.S. 我不久前测试 ‘’ 还是直接显示为全角的,所以我往 hugo-theme-meme 里添加了一条改动。也就是说,这是 12 天之内发生的变化 :)

@reuixiy
Copy link
Owner Author

reuixiy commented Dec 7, 2019

reuixiy added a commit to reuixiy/hugo-theme-meme that referenced this issue Dec 7, 2019
@reuixiy
Copy link
Owner Author

reuixiy commented Dec 7, 2019

貌似还和浏览器有关,手机上测试,Long Cang 字体的 失效,但电脑上成功……

在中文字体后添加相应的网络英文字体,这样就能避免回退到浏览器或系统的默认字体的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Notes 一些日常笔记
Projects
None yet
Development

No branches or pull requests

1 participant