Foren: 公開討議/質問 (Thread #40758)

\setmonojfontの定義 (2019-05-14 17:28 by ぐっち #82989)

luatexja-fontspec内の\setmonojfontの定義部分

\DeclareDocumentCommand \setmonojfont { O{} m } {
\ltj_fontspec_set_family:Nnn \jttdefault {##1}{##2}
\normalfont
}

ですが,ちょっとだけ付け足して\setsansjfontの定義部分である

\DeclareDocumentCommand \setsansjfont { O{} m O{} } {
\ltj_fontspec_set_family:Nnn \gtdefault {#1,#3}{#2}
\unless\ifltj@disablejfam
\DeclareMathAlphabet{\mathgt}{JY3}{\l_fontspec_family_tl}{\mddefault}{n}
\fi
\normalfont
}

と同じようにすると,例えば

\setmonofont {SourceHanCodeJP}[
FontFace = {l}{\updefault}{* Light},
UprightFont = {* Regular},
BoldFont = {* Bold},
FontFace = {eb}{\updefault}{* Heavy},
]
\setmonojfont {SourceHanCodeJP}[
FontFace = {l}{\updefault}{* Light},
UprightFont = {* Regular},
BoldFont = {* Bold},
FontFace = {eb}{\updefault}{* Heavy},
]

とすることでtypewriter体が細から極太まで使えてちょっと嬉しかったりしますけど,どうでしょうか。
必要性は皆無と思いますが...

Reply to #82989×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Anmelden

Re: \setmonojfontの定義 (2019-05-14 21:10 by h7k #82990)

メッセージ #82989 への返信
> luatexja-fontspec内の\setmonojfontの定義部分
>
> \DeclareDocumentCommand \setmonojfont { O{} m } {
> \ltj_fontspec_set_family:Nnn \jttdefault {##1}{##2}
> \normalfont
> }
>
> ですが,ちょっとだけ付け足して\setsansjfontの定義部分である


ほんとですね,\setmainjfont, \setsansjfont の定義を更新した時に \setmonojfont について同じことをやるのを忘れていたようです,直しておきます.
Reply to #82989

Reply to #82990×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Anmelden

Re: \setmonojfontの定義 (2019-05-16 12:12 by ぐっち #83003)

メッセージ #82990 への返信
> ほんとですね,\setmainjfont, \setsansjfont の定義を更新した時に \setmonojfont について同じことをやるのを忘れていたようです,直しておきます.

早速の対応,ありがとうございます。必要性はアレですが試しにtypesetしてみると,なんかこう嬉しいですね。
Reply to #82990

Reply to #83003×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Anmelden