9

I'm trying to typeset a word that contains a 'Č', and due to context, it has to appear in a sans, bold, quattrocento font.

However, whenever I have the fontencoding set to T1, then the character doesn't appear at all. The following MWE creates a blank page but should create a single bold sans 'Č'.

Commenting out the fontenc line seems to fix the problem, but I'd prefer to have a special case for this character then change the fontencoding for the entire document

MWE:

\documentclass{article}


\usepackage[T1]{fontenc}

\usepackage[sf,scaled=0.9]{quattrocento}

\begin{document}
\textbf{\textsf{\v{C}}}
\end{document}
10

The font misses several precomposed accented glyphs. At the expense of the possibility to hyphenate the words containing Č, you can do

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[sf,scaled=0.9]{quattrocento}

\providecommand*\UndeclareTextComposite[3]{%
  \expandafter\let\csname\expandafter\string\csname
  #2\endcsname\string#1-#3\endcsname\relax}

\UndeclareTextComposite{\v}{T1}{C}

\begin{document}

\textsf{\v{C}}
\textbf{\textsf{\v{C}}}

\end{document}

enter image description here

See https://tex.stackexchange.com/a/58115/4427 for \UndeclareTextCompositeCommand. Do similarly for other missing accented characters you need.

It's immaterial whether you use \v{C} or directly Č.

Note. The maintainer of the LaTeX font package remarked that the glyphs are missing because they're not even in the OpenType font the TeX version is derived from.

| improve this answer | |
  • Is there an easy solution to provide accents for those letters: ąęłżĄĘŁŻ? I managed to use the same solution, which you described for obtaining ńśćźóŃŚĆŹÓ, but I failed to retrieve the latter ones. – andywiecko Dec 6 '19 at 15:18
  • 1
    @andywiecko I'm afraid that the ogonek is very difficult to place correctly. – egreg Dec 6 '19 at 15:20
  • @andywiecko Use a different font. – egreg Dec 6 '19 at 15:29
  • what about replacing ogonek with cedilla? I know that this is ugly solution, but is it doable? – andywiecko Dec 6 '19 at 15:29
  • @andywiecko I'd not do it even under threat. – egreg Dec 6 '19 at 15:30
1

Here is another solution using the OpenType font. The version of Quattrocento Sans I downloaded does not contain the Unicode characters U+030C (combining caron) or U+010C (Latin Capital Letter C with Caron), but you can fake it with U+02C7 (Caron) and \accent. You can also use Ulrike Fischer’s solution to this similar problem.

\documentclass{article}
\usepackage{fontspec, newunicodechar}

\defaultfontfeatures{Scale = MatchLowercase}
\setmainfont{Quattrocento Roman}[Scale = 1.0]
\setsansfont{Quattrocento Sans}

\renewcommand\v[1]{{\accent"02C7 #1}}
\newunicodechar{Č}{\v{C}}
\newunicodechar{č}{\v{c}}

\begin{document}
\textbf{\textsf{\v{C}Č}}
\end{document}

Quattrocento Sans font sample

Warning: this supports Č (U+010C), but won’t necessarily work if you write it as Č (U+43 U+030C).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.