% \iffalse meta-comment % % RWTH-CI -- Corporate Design for RWTH Aachen % ---------------------------------------------------------------------------- % % Copyright (C) 2025 by Marei Peischl and Lukas C. Bossert % % ============================================================================ % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3c or later is part of all distributions of LaTeX % version 2008/05/04 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is % Marei Peischl rwth-ci@peitex.de % % The development repository can be found at % https://git.rwth-aachen.de/rwth-latex % Please use the issue tracker for feedback! % % ============================================================================ % % \fi % \iffalse %<*driver> \ProvidesFile{rwth-fonts.dtx} [2025-12-18 v1.0 Fonts for RWTH-CI, Corporate Design of RWTH Aachen] % %<@@=ptxcd> %<*identification> \NeedsTeXFormat{LaTeX2e}[2022-10-01] %\ProvidesExplPackage{rwth-fonts}{2025-12-18}{1.0}{Fonts for RWTH-CI} % %<*driver> \providecommand*{\PtxcdDocDTXfiles}{rwth-fonts.dtx} \providecommand*{\PtxcdDocTitle}{Fonts for RWTH-CI} \input{rwth-ci.dtx} % % \fi % \begin{documentation} % \section{Font configuration – \pkg{rwth-fonts.sty}} % \end{documentation} % \begin{implementation} % \iffalse %<*initialize> % \fi % \begin{variable}{\g_@@_freefonts_bool,\g_@@_font_error_bool} % Variables corresponding to \option{freefonts} % \begin{macrocode} \bool_new:N \g_@@_freefonts_bool \bool_new:N \g_@@_font_error_bool % \end{macrocode} % \end{variable} % \iffalse % %<*declareoptions> % \fi % \begin{macrocode} \keys_define:nn {ptxcd/fonts} { % \end{macrocode} % \iffalse % %<*options> % \fi % \end{implementation} % \begin{documentation} % \DescribeKeyOption{freefonts=value}{auto} % The Corporate Design is using commercial fonts. % To allow editing documents also on computers without a valid font license, the option \option{freefonts} provides a mechanism for this. % By default the font selection is configured to try to use the official font if available. % And will create a warning if the official setting is not possible. % % Please be aware that chcking font availability slows down the compilation process. % You probably want to set the value to true or false to speed up. % \end{documentation} % \begin{implementation} % \begin{optionenv}{freefonts} % \begin{macrocode} freefonts .choice:, freefonts / true .code:n = { \bool_gset_true:N \g_@@_freefonts_bool \bool_gset_false:N \g_@@_font_error_bool }, freefonts / auto .code:n = { \bool_gset_false:N \g_@@_freefonts_bool \bool_gset_false:N \g_@@_font_error_bool }, freefonts / false .code:n = { \bool_gset_false:N \g_@@_freefonts_bool \bool_gset_true:N \g_@@_font_error_bool }, freefonts .initial:n = auto, freefonts .default:n = true, freefonts .usage:n = load, % \end{macrocode} % \end{optionenv} % \end{implementation} % \begin{documentation} % \DescribeKeyOption{fontdefaults=\meta{boolean}}{true} % Configure if this package is setting any font defaults or only adds a font family matching the requirements. % \end{documentation} % \begin{implementation} % \begin{optionenv}{fontdefaults} % \begin{macrocode} fontdefaults .bool_gset:N = \g_@@_fontdefaults_bool, fontdefaults .initial:n = false, fontdefaults .default:n = true, fontdefaults .usage:n = load, % \end{macrocode} % \end{optionenv} % \iffalse % %<*processoptions> % \fi % \begin{macrocode} } \ProcessKeyOptions[ptxcd/fonts] % \end{macrocode} % \iffalse % %<*body> % \fi % Save the sfdefault to avoid interaction with other parts of the document. % \begin{macrocode} \bool_if:NF \g_@@_fontdefaults_bool { \let\rwth@cached@fdefault\sfdefault } \RequirePackage{iftex} \ifPDFTeX \bool_if:NTF \g_@@_freefonts_bool { \RequirePackage{arimo} } { \file_if_exist:nTF {uarial.sty} { \RequirePackage[scaled]{uarial} } { \RequirePackage{arimo} } } \RequirePackage[T1]{fontenc} \else \RequirePackage{fontspec} \bool_if:NTF \g_@@_freefonts_bool { \RequirePackage{arimo} } { \setsansfont[ ItalicFont = *-Italic , BoldFont = *-Bold , BoldItalicFont = *-BoldItalic ]{Arial} } \fi \bool_if:NTF \g_@@_fontdefaults_bool { \renewcommand*{\familydefault}{\sfdefault} } { \let\rwth@sffamily\sfdefault \let\rwth@cached@sfdefault\sfdefault } \RequirePackage{anyfontsize} % \end{macrocode} % %^^A\cite[22,24]{rwth-ci-basics} % The Design Guideline does not allow any use of italic text. % \cs{emph} is configured to use bold text instead. % \begin{macrocode} \DeclareEmphSequence{\bfseries} \cs_if_exist:NF \ptxcd@OrigLaTeXLogo { \bool_if:NF \g_@@_use_LaTeX_Logo_bool { \let\ptxcd@OrigLaTeXLogo\LaTeX \let\ptxcd@OrigTeXLogo\TeX \renewcommand*\LaTeX{LaTeX} \renewcommand*\TeX{TeX} } } % \end{macrocode} % \iffalse % % \fi % \end{implementation} % \Finale \endinput