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

为全角标点添加 halt feature(可变为半角标点) #104

Closed
ouuan opened this issue Feb 3, 2023 · 3 comments
Closed

为全角标点添加 halt feature(可变为半角标点) #104

ouuan opened this issue Feb 3, 2023 · 3 comments

Comments

@ouuan
Copy link

ouuan commented Feb 3, 2023

希望能为全角标点添加 halt feature。

一个使用场景是在 CSS 中使用 font-feature-setings 来将全角标点变为半角显示,从而可以实现标点挤压。(网页标点挤压也有其他实现方式,但通过 font feature 来实现遇到的问题会相对较少,其他解决方式更像是 workaround。)

思源宋体支持 halt 和 palt 两个 feature,对于常见的全角标点效果貌似是一样的,所以也可以考虑同时添加 palt feature。

我自己简单尝试了一下为几个标点添加 halt feature,即在 ufo 的 features.fea 中添加下面的内容:

feature halt {
  position \uFF0C <0 0 -500 0>;
  position \u3002 <0 0 -500 0>;
  position \uFF08 <-500 0 -500 0>;
  position \uFF09 <0 0 -500 0>;
} halt;

效果如图所示:

demo

@lxgw
Copy link
Owner

lxgw commented Feb 3, 2023

由于更新涉及 20 个以上的字体文件,故尚无修改 OpenType 特性的计划。

@ouuan ouuan closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2023
@yisibl
Copy link

yisibl commented Mar 27, 2024

随着 Chrome 123 正式发布了CJK 字体的「标点挤压功能」,越来越多的用户可以享受到这一改进。但目前 Chrome 中的该功能依赖字体具有 haltchws 特性,所以强烈建议重新考虑该功能。

https://twitter.com/yisibl/status/1764871494293979147

@lxgw lxgw reopened this Sep 18, 2024
@lxgw
Copy link
Owner

lxgw commented Sep 18, 2024

重新打开这个 issue,下个版本将会加入 haltvhal 特性,用于 Chrome 标点挤压。

下图为「霞鹜文楷 TC」的测试效果,如无意外,其他字形版本也会跟进。
50a056714e50ab2a5c2e6551b3cec782

@lxgw lxgw closed this as completed Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants