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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions japanese-otf-uptex/sty/otf.sty
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
\newif\if@newglyph \@newglyphfalse
\newif\if@otf@uplatex \@otf@uplatexfalse
\newif\if@otf@autodetect \@otf@autodetectfalse
\newif\if@otf@lmodern \@otf@lmodernfalse
\newif\if@otf@scale \@otf@scalefalse
\newif\if@jsclasses \@jsclassesfalse

Expand All @@ -24,6 +25,7 @@
\DeclareOption{burasage}{\@burasagetrue}
\DeclareOption{uplatex}{\@otf@uplatextrue}
\DeclareOption{autodetect-engine}{\@otf@autodetecttrue}
\DeclareOption{lmodern}{\@otf@lmoderntrue}
\DeclareOption{jis2004}{\@newglyphtrue}
\DeclareOption*{\otfpkg@setkey}
\def\otfpkg@setkey{\expandafter\otfpkg@setkey@a\expandafter{\CurrentOption}}
Expand All @@ -33,6 +35,7 @@
\def\otf@JYn{\if@otf@uplatex JY2\else JY1\fi}
\def\otf@JTn{\if@otf@uplatex JT2\else JT1\fi}
\def\otf@OTorT{\if@otf@uplatex T\else OT\fi}
\def\otf@cmorlm@{\if@otf@lmodern l\else c\fi m}
\def\otf@pfx@{\if@otf@uplatex up\else \fi}
\def\brsg@pfx@{\if@burasage brsg\else\fi}
\def\nlck@sfx@{\if@newglyph n\else\fi}
Expand Down Expand Up @@ -66,6 +69,10 @@
\@otf@uplatexfalse
\fi
\fi
% Latin Modern
\@ifpackageloaded{lmodern}{%
\PackageInfo{otf}{Relation font: Latin Modern}
\@otf@lmoderntrue}\relax
%user interface
%force catcode of \" be 12
\count@\catcode`\"
Expand Down Expand Up @@ -293,20 +300,20 @@
\DeclareKanjiFamily{\otf@JTn}{hmc}{}
\DeclareKanjiFamily{\otf@JYn}{hgt}{}
\DeclareKanjiFamily{\otf@JTn}{hgt}{}
\DeclareRelationFont{\otf@JYn}{hmc}{m}{}{\otf@OTorT1}{cmr}{m}{}
\DeclareRelationFont{\otf@JTn}{hmc}{m}{}{\otf@OTorT1}{cmr}{m}{}
\DeclareRelationFont{\otf@JYn}{hmc}{bx}{}{\otf@OTorT1}{cmr}{bx}{}
\DeclareRelationFont{\otf@JTn}{hmc}{bx}{}{\otf@OTorT1}{cmr}{bx}{}
\DeclareRelationFont{\otf@JYn}{hmc}{m}{}{\otf@OTorT1}{\otf@cmorlm@ r}{m}{}
\DeclareRelationFont{\otf@JTn}{hmc}{m}{}{\otf@OTorT1}{\otf@cmorlm@ r}{m}{}
\DeclareRelationFont{\otf@JYn}{hmc}{bx}{}{\otf@OTorT1}{\otf@cmorlm@ r}{bx}{}
\DeclareRelationFont{\otf@JTn}{hmc}{bx}{}{\otf@OTorT1}{\otf@cmorlm@ r}{bx}{}
\if@deluxe
\DeclareRelationFont{\otf@JYn}{hgt}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JTn}{hgt}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JYn}{hgt}{bx}{}{\otf@OTorT1}{cmss}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{bx}{}{\otf@OTorT1}{cmss}{bx}{}
\DeclareRelationFont{\otf@JYn}{hgt}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRelationFont{\otf@JTn}{hgt}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRelationFont{\otf@JYn}{hgt}{bx}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{bx}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{bx}{}
\else
\DeclareRelationFont{\otf@JYn}{hgt}{m}{}{\otf@OTorT1}{cmr}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{m}{}{\otf@OTorT1}{cmr}{bx}{}
\DeclareRelationFont{\otf@JYn}{hgt}{bx}{}{\otf@OTorT1}{cmr}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{bx}{}{\otf@OTorT1}{cmr}{bx}{}
\DeclareRelationFont{\otf@JYn}{hgt}{m}{}{\otf@OTorT1}{\otf@cmorlm@ r}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{m}{}{\otf@OTorT1}{\otf@cmorlm@ r}{bx}{}
\DeclareRelationFont{\otf@JYn}{hgt}{bx}{}{\otf@OTorT1}{\otf@cmorlm@ r}{bx}{}
\DeclareRelationFont{\otf@JTn}{hgt}{bx}{}{\otf@OTorT1}{\otf@cmorlm@ r}{bx}{}
\fi
\@ifpackageloaded{jisx0213}{\relax}{\def\mcdefault{hmc}\def\gtdefault{hgt}}
\if@jfam@used
Expand All @@ -327,8 +334,8 @@
\if@deluxe
\DeclareKanjiFamily{\otf@JYn}{rubyg}{}
\DeclareKanjiFamily{\otf@JTn}{rubyg}{}
\DeclareRelationFont{\otf@JYn}{rubyg}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JTn}{rubyg}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JYn}{rubyg}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRelationFont{\otf@JTn}{rubyg}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRobustCommand\rubyfamily{\edef\reserved@a{\gtdefault}%
\edef\reserved@b{\mgdefault}%
\ifx\k@family\reserved@a \kanjifamily{rubyg}\else\ifx\k@family\reserved@b
Expand Down Expand Up @@ -410,16 +417,16 @@
\def\ltdefault{l}
\DeclareKanjiFamily{\otf@JYn}{mg}{}
\DeclareKanjiFamily{\otf@JTn}{mg}{}
\DeclareRelationFont{\otf@JYn}{mg}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JTn}{mg}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JYn}{mg}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRelationFont{\otf@JTn}{mg}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareMathAlphabet{\mathmg}{\otf@JYn}{mg}{m}{n}
\DeclareRobustCommand\mgfamily{\not@math@alphabet\mgfamily\mathmg%
\kanjifamily\mgdefault\selectfont}
\DeclareTextFontCommand{\textmg}{\mgfamily}
\DeclareKanjiFamily{\otf@JYn}{rubymg}{}
\DeclareKanjiFamily{\otf@JTn}{rubymg}{}
\DeclareRelationFont{\otf@JYn}{rubymg}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JTn}{rubymg}{m}{}{\otf@OTorT1}{cmss}{m}{}
\DeclareRelationFont{\otf@JYn}{rubymg}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRelationFont{\otf@JTn}{rubymg}{m}{}{\otf@OTorT1}{\otf@cmorlm@ ss}{m}{}
\DeclareRobustCommand\propshape
{\not@math@alphabet\propshape\relax
\kanjishape\propdefault\selectfont}
Expand Down