3

On this answer, pablos almost solved my problem. I am desperate in finding a better-looking lowercase g. Indeed, if I just use :

\usepackage{calligra}
\newcommand{\g}{\textup{\large\calligra g}\,}

then the output is the following :

I am having several concerns about this approach :

  1. The scripted g is pixellated (I don't really mind, as it is only meant to be use in regularly-sized equations).
  2. The scripted g is too italicized, it becomes weird in equations, and especially in inline math :

  1. (However, this is probably related to 2.) The tail of the scripted g descends too low, and the top part part is too low too.

Here are all my concerns in a drawing, and for reference, the vanilla \ell command, fitting what I'm expecting :

Does anyone have any clues on how to fix this ? I tried using \rotateboxes, but the fact that this letter is highly pixellated rendered terrible and blurry. Also, I tried several other fonts, none of which providing a scripted g like the calligra one...

P.S. : I feel very sorry if that kind of question is unwelcomed here, but I have been trying for more than an hour now... I hope I'm not asking a "do it for me" question out of despair for finding a solution...

Anthony
  • 250
  • There are a few 8-bit fonts that have a \mathcal{g}, including stix2. All fonts usable with unicode-math do. – Davislor Sep 22 '20 at 09:20

1 Answers1

4

First, if you install the calligra-type1 package, you can \usepackage{calligra} and get non-pixelated fonts. Then, I suggest the use of \unslant (limited to the pdflatex engine), detailed here: Upright Greek font fitting to Computer Modern.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{calligra,amsmath,amssymb,lmodern}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\mbox{%
        \sbox{\foobox}{#2}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
}}
\newcommand\unslant[2][-.25]{\slantbox[#1]{$#2$}}

\newcommand{\g}{\unslant[-.5]{$\calligra g$},}

\begin{document}

\textit{g} $\g\colon \mathbb{R}\to \mathcal{W}$

\end{document}

enter image description here