Closed trueroad closed 7 years ago
The main difference between Source Han Sans and Source Han Serif is that the Regular weights in the latter are style-linked to the Bold weights. I cannot see this being an issue with the Super OTC, but rather a fontconfig issue. It is highly likely that this is the first time that fontconfig has been asked to support such a font, so it is not a shock that this issue arose. Un–style-linking the fonts is a nonstarter.
Also, when Source Han Sans Version 2.000 is released, its Regular weights will also be style-linked to its Bold weights.
Thank you for your description. I understood that the way to specify the font has been changed by style-link.
I've noticed that the fonts can be specified in the following way by fontconfig
.
$ fc-match -v "Source Han Serif:style=Regular" | grep -e file -e index -e postscript
file: "/home/trueroad/.local/share/fonts/SourceHanSerif/SourceHanSerif.ttc"(w)
index: 8(i)(w)
postscriptname: "SourceHanSerif-Regular"(w)
$ fc-match -v "Source Han Serif:style=Bold" | grep -e file -e index -e postscript
file: "/home/trueroad/.local/share/fonts/SourceHanSerif/SourceHanSerif.ttc"(w)
index: 20(i)(w)
postscriptname: "SourceHanSerif-Bold"(w)
$ fc-match -v "Source Han Sans:style=Regular" | grep -e file -e index -e postscript
file: "/home/trueroad/.local/share/fonts/SourceHanSans/SourceHanSans.ttc"(w)
index: 12(i)(w)
postscriptname: "SourceHanSans-Regular"(w)
$ fc-match -v "Source Han Sans:style=Bold" | grep -e file -e index -e postscript
file: "/home/trueroad/.local/share/fonts/SourceHanSans/SourceHanSans.ttc"(w)
index: 24(i)(w)
postscriptname: "SourceHanSans-Bold"(w)
I used a font name containing a weight name.
Current Source Han Sans
all weights can be specified by this way.
$ fc-match -v "Source Han Sans Regular" | grep -e file -e index -e postscript
file: "/home/trueroad/.local/share/fonts/SourceHanSans/SourceHanSans.ttc"(w)
index: 12(i)(w)
postscriptname: "SourceHanSans-Regular"(w)
$ fc-match -v "Source Han Sans Bold" | grep -e file -e index -e postscript
file: "/home/trueroad/.local/share/fonts/SourceHanSans/SourceHanSans.ttc"(w)
index: 24(i)(w)
postscriptname: "SourceHanSans-Bold"(w)
But, Source Han Serif
Regular and Bold cannot be specified by this way.
So I wrote this issue.
$ fc-match -v "Source Han Serif Regular" | grep -e file -e index -e postscript
file: "/usr/share/texmf-dist/fonts/truetype/public/ipaex/ipag.ttf"(w)
index: 0(i)(w)
postscriptname: "IPAGothic"(w)
$ fc-match -v "Source Han Serif Bold" | grep -e file -e index -e postscript
file: "/usr/share/texmf-dist/fonts/truetype/public/ipaex/ipag.ttf"(w)
index: 0(i)(w)
postscriptname: "IPAGothic"(w)
Anyway, I will use the former way instead of latter way. Thank you.
Yes, when fonts are style-linked, it changes how they need to be specified in certain environments.
I've noticed that fontconfig does not seem to be able to handle Super OTC's
Source Han Serif Regular
andSource Han Serif Bold
.For Source Han Sans Super OTC, it is no problem.
If I understand correctly, the cause is that some names are inconsistent. The names of
Regular
andBold
do not contain its weight name, others contain its weight name.For Source Han Sans Super OTC, the names seem to be consistent.
Here is the inconsistent names I found.
Index 0: SourceHanSerif-ExtraLight
Font Family name
andFull font name
contain its weight name. It is no problem.Index 4: SourceHanSerif-Light
Font Family name
andFull font name
contain its weight name. It is no problem.Index 8: SourceHanSerif-Regular
Font Family name
andFull font name
do not contain its weight name. So fontconfig cannot select it.Index 12: SourceHanSerif-Medium
Font Family name
andFull font name
contain its weight name. It is no problem.Index 16: SourceHanSerif-SemiBold
Font Family name
andFull font name
contain its weight name. It is no problem.Index 20: SourceHanSerif-Bold
Font Family name
does not contain its weight name. So fontconfig cannot select it.Index 24: SourceHanSerif-Heavy
Font Family name
andFull font name
contain its weight name. It is no problem.