0

Although I like Computer Modern font families I'd like to be able to make documents look like they were made by "normal person" and still be able to benefit from the TeX powers*. In short the solution must fullfill four simple requirements:

  1. Cover same font characteristics both for math mode and regular one.
  2. Cover glyphs beyond ASCII table correcly.
  3. Support luaLaTeX and optionally XeTeX.
  4. Cover serif and sans serif faces with all faces (regular, semibold, italic).

Simple requirements but hard to accomplish, though.

So far I am able to fulfill all points with default Computer Modern font failing the zeroth one.

I can also fulfill the points except #2 by using fonts from this site, say:

\usepackage[utf8]{inputenc}
\usepackage{arev}
\usepackage[T1]{fontenc}

and I've identified the T1 encoding to be responsible for the limitted support.

I can also fulfill the points except #1, the math font is Still Computer Modern Roman:

\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\setmainfont{Arial}[
UprightFeatures = { SizeFeatures = {
{Size=-10, OpticalSize=8 },
{Size= 10-14, OpticalSize=10},
{Size= 14-18, OpticalSize=14},
{Size= 18-, OpticalSize=18}}}
]

Testing sentence is: Příliš žluťoučký kůň úpěl ďábelské ódy. Feel free to add other dummy sentences if you've found occasions where czech typesetting was correct while the other was not.


* That means user unfriendly interference with styles, easy splitting "Style definitions" part from the Content part, output stability, stable counters, easy referencing and many others. In short, all the little features we like in (lua)LaTeX.

Crowley
  • 4,297
  • 1
  • @PhelypeOleinik It seems so and the answer seems it has solved my problem with serif fonts. Anyway, very good find and shame on me I didn't find it myself. – Crowley Nov 07 '18 at 21:34
  • 1
    Good to know it solved you problem :) I'll mark as a duplicate. – Phelype Oleinik Nov 07 '18 at 21:36
  • 3
    never use [T1]{fontenc} with luatex or xetex, so your first example doesn't cover your point #3 Also never use [utf8]{inputenc} as that does nothing with luatex or xetex (and nothing with pdftex in the latest latex release) – David Carlisle Nov 07 '18 at 21:46
  • @DavidCarlisle Thanks a lot for your comment, I use the inputenc package from start by default, never realising it is not needed anymore. – Crowley Nov 07 '18 at 21:49
  • 4
    with luatex and xetex it initially completely broke the document until it was changed to do nothing (with a big warning in the log). pdftex is different in that since this years release it is essentially pre-loaded. Using T1 fontenc encoding with luatex means you can't use unicode fonts, and with xetex it means that all hyphenation will be wrong. – David Carlisle Nov 07 '18 at 21:55

0 Answers0