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

Relation font: Computer Modern -> Latin Modern when loading lmodern package #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

munepi
Copy link
Member

@munepi munepi commented Dec 2, 2018

lmodern パッケージが読み込まれていたら、和文書体の従属欧文書体をLatin Modernに置き換えたらどうかというPRです。

独り言:ただ…、実用上では、おそらくこれでは不十分で、 \ltseries, \ebseries を考慮していないですね。場当たり的にやると、下記のように上書きしちゃう手もあるかもです。

\RequirePackage{lmodern}
\input t1lmr.fd
\input t1lmss.fd
\DeclareFontShape{T1}{lmr}{l}{n}{<->sub*lmr/m/n}{}
\DeclareFontShape{T1}{lmss}{eb}{n}{<->sub*lmss/bx/n}{}

\RequirePackage[deluxe,jis2004]{otf}
\DeclareRobustCommand\ltseries{\not@math@alphabet\ltseries\relax
  \romanseries\ltdefault\kanjiseries\ltdefault\selectfont}
\DeclareRobustCommand\ebseries{\not@math@alphabet\ebseries\relax
  \romanseries\ebdefault\kanjiseries\ebdefault\selectfont}
\DeclareRobustCommand\mgfamily{\not@math@alphabet\mgfamily\mathmg\relax
  \romanfamily\sfdefault\kanjifamily\mgdefault\selectfont}
\DeclareRobustCommand\textmc[1]{%
    \relax\ifmmode \expandafter\nfss@text \fi{\mcfamily #1}}
\DeclareRobustCommand\textgt[1]{%
    \relax\ifmmode \expandafter\nfss@text \fi{\gtfamily\sffamily #1}}
\DeclareTextFontCommand{\textlt}{\mcfamily\ltseries}%%<- otfパッケージ利用のみ前提で、mc以外を考慮していない
\DeclareTextFontCommand{\texteb}{\gtfamily\sffamily\ebseries}%%<- otfパッケージ利用のみ前提で、gt以外を考慮していない
\DeclareRelationFont{\otf@JYn}{hmc}{l}{}{\otf@OTorT1}{lmr}{l}{}
\DeclareRelationFont{\otf@JTn}{hmc}{l}{}{\otf@OTorT1}{lmr}{l}{}
\DeclareRelationFont{\otf@JYn}{hmc}{m}{}{\otf@OTorT1}{lmr}{m}{}
\DeclareRelationFont{\otf@JTn}{hmc}{m}{}{\otf@OTorT1}{lmr}{m}{}
\DeclareRelationFont{\otf@JYn}{hmc}{bx}{}{\otf@OTorT1}{lmr}{bx}{}
\DeclareRelationFont{\otf@JTn}{hmc}{bx}{}{\otf@OTorT1}{lmr}{bx}{}
\DeclareRelationFont{\otf@JYn}{hgt}{m}{}{\otf@OTorT1}{lmss}{m}{}
\DeclareRelationFont{\otf@JTn}{hgt}{m}{}{\otf@OTorT1}{lmss}{m}{}
\DeclareRelationFont{\otf@JYn}{hgt}{bx}{}{\otf@OTorT1}{lmss}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{bx}{}{\otf@OTorT1}{lmss}{bx}{}
\DeclareRelationFont{\otf@JYn}{hgt}{eb}{}{\otf@OTorT1}{lmss}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{eb}{}{\otf@OTorT1}{lmss}{bx}{}
\DeclareRelationFont{\otf@JYn}{mg}{m}{}{\otf@OTorT1}{lmss}{m}{}
\DeclareRelationFont{\otf@JTn}{mg}{m}{}{\otf@OTorT1}{lmss}{m}{}

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

Successfully merging this pull request may close these issues.

None yet

1 participant