# Options for pairing Concrete Roman with a .ttf font

Will Robertson will at wspr.io
Tue Sep 21 02:28:30 CEST 2021

Hi Boris,

I don’t have an up-to-date installation to test with on this machine and I can see there may be some interactions between newer LaTeX2e code and fontspec that I need to take into account. I can also see I need to add an interface to change the default encoding for different font families. With that being said, does the example document below appear to work for you?

It’s a bit fragile in terms of loading order and needing that initial \rmfamily. Once we have an example that I can work towards I can try to improve the fontspec behaviour...

Many thanks,
Will

\documentclass{article}

\usepackage{concmath}
\usepackage{fontspec}

\renewcommand\rmdefault{ccr}
\ExplSyntaxOn
\tl_set:Nn \l__fontspec_rmfamily_encoding_tl {OT1}
\tl_set:Nn \l__fontspec_sffamily_encoding_tl {TU}
\ExplSyntaxOff
\setsansfont{texgyreheros-regular.otf}

\begin{document}
\rmfamily hello world

\sffamily sans font

\rmfamily main font
\end{document}

> On 21 Sep 2021, at 1:58 am, Boris Veytsman <borisv at lk.net> wrote:
>
> WR> From: Will Robertson <will at wspr.io>
> WR> Date: Sun, 19 Sep 2021 11:36:18 +0930
>
>
> WR> Nothing has changed recently (I am quite sad that I haven’t been
> WR> able to do new releases on my latex packages for some years
> WR> now). You just need to load fontenc first with the necessary
> WR> encodings and be careful about explicitly setting the encoding you
> WR> want for each font you select. Note that fontspec patches commands
> WR> like \rmfamily to include the encoding selection and it’s possible
> WR> that I have neglected to add a command to change/customise this…
>
> I might be a change in the fontenc package:  looks like now loading it
> before fontspec does not change the behaviour.
>
>
> --
> Good luck
>
> -Boris
>
> Not that I have anything much against redundancy.  But I said that already.
> 		-- Larry Wall in <199702271735.JAA04048 at wall.org>