0

I wanted a sans serif font in Latex, where the capital I looks different than the small l. I came across droid font, which is nice but too wide and takes up too much space. Currently, I am using

\usepackage[T1]{fontenc}
\renewcommand{\familydefault}{\sfdefault}

The "solution" I am thinking of is to only use capital I of the droid font, with everything else remaining the same. Is it possible? If so, how?

5
  • 2
    Please, do not do this. Glyphs from different font are generally incompatible: they have different stroke thickness, different tip roundness, etc. I'm tempted to say that it's even better to design a new letter into the font. And btw, the two letters are distingueshed quite well in CMSS: the I is reasonably thicker than the l.
    – yo'
    Sep 2, 2014 at 18:18
  • 1
    not that it helps, but there's an amusing tugboat article by chuck bigelow, "oh, oh, zero", about the confusing nature of "ohs" and zeros, and ones, "ells", and "eyes". the problem has been around for a long time. Sep 2, 2014 at 18:23
  • Take a look at the cabin font. Not only is small l different from capital I, but it has smallcaps in all shapes/weights (including semibold) and also exists in Opentype format.
    – Bernard
    Sep 2, 2014 at 18:42
  • @tohecz Any explanation on how to "design a new letter into the font"? I am not familiar with that idea at all
    – Ankush
    Sep 2, 2014 at 19:14
  • @Ankush I don't know how to design a new letter nor how to make LaTeX use it. I'm sure that this all this is solvable by LuaLaTeX.
    – yo'
    Sep 2, 2014 at 19:36

2 Answers 2

2

THIS IS NOT RECOMMENDED, not only because of tohecz's comment, but because making letters active can break all sorts of things (e.g., any macro with a capital "I" in its name). Nonetheless, here is a way to use a different capital I without creating a whole new font.

\documentclass[11pt]{article}
\let\svcapi I
\catcode`I=\active
\defI{$\mathcal{\svcapi}$}
\begin{document}
Is this doing capital I in a different font?
\end{document}

enter image description here

Alternatively, to achieve a manual implementation that avoids the active letter problem, you could \def\myI{$\mathcal{\svcapi}$} and use \myI{} whereever you wanted the alternate "I", as in \myI{}s this doing capital \myI{} in a different font?

5
  • 1
    Yep, this breaks usage of any macros where I is in the title. The error Undefined control sequence knows to be very confusing in these situations, and that's the better things that can happen.
    – yo'
    Sep 2, 2014 at 18:26
  • This makes the I a mathcal symbol. How do I make it droid font I?
    – Ankush
    Sep 2, 2014 at 18:37
  • @Ankush I am not familiar with the droid font, to know the answer, but I'll see what I can find. Sep 2, 2014 at 18:38
  • 1
    @Ankush I am sorry, but I am unable to get the droid font working on my system (though I found it on CTAN). So I can't play with it to answer your droid-specific question. However, I'm thinking it might be something along the lines of \def\myI{\fdsfamily I} Sep 2, 2014 at 19:01
  • \usepackage{droidsans} and then \def\myI{{\fdsfamily I}} works. But as you said it is not a pretty fix, works nevertheless.
    – Ankush
    Sep 2, 2014 at 21:24
1

As I said in my comment, you can trys the cabin font. It also has small caps, greek and cyrillic glyphs. Here is a demo. As the kerning is rather tight, in my opinion, I used some letterspacing with the help of the microtype package:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{cabin}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{microtype}

\usepackage[x11names]{xcolor}

\begin{document}

\SetTracking[no ligatures = {f}]{encoding = *}{10}\lsstyle
In this font, the small letter \textcolor{Tomato3}{l} is noticeably different from capital \textcolor{Tomato3}{I} and from the number \textcolor{Tomato3}{1}: Prosper Mérimée wrote his fantastic novella ‘La Vénus d’Ille’ in 1835.

\end{document} 

enter image description here

1
  • For some reason, it does not work on my system. I downloaded 4 different style files, but at the end it gives a serif font.
    – Ankush
    Sep 2, 2014 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .