[luatex] LuaTeX and LuaLaTeX logos

Heiko Oberdiek heiko.oberdiek at googlemail.com
Wed Mar 10 10:54:58 CET 2010


Hi Hans,

On Tue, Mar 09, 2010 at 07:59:08PM +0100, Hans Hagen wrote:

> Hi Khaled:
> 
> >P.S.2 I posted a more funny LuaTeX logo a while ago, it was a kind of
> >joke actually, just in case some one came across it and thought I was
> >seriously proposing it.
> 
> Actually we can make a nice definition using the RL typesetting ...
> as not that many fonts have a proper aT kerning we can do the
> following:
> 
> \def\LuaTeX
>   {\begingroup
>    Lua%
>    \setbox0\hbox{oT}%
>    \setbox2\hbox{o\kern0ptT}%

Using `o' it remains hidden whether the font contains `aT' kerning.
Therefore I think `a' should be used instead of `o'.

>    \ifdim\wd0=\wd2
>      \setbox0\hbox dir TRT{To}%

I don't see the point in using TRT. What's the difference to \hbox{oT}?

>      \setbox2\hbox{T\kern0pto}%
>      \hskip\dimexpr\wd0-\wd2\relax
>    \fi
>    \TeX
>    \endgroup}
> 
> Of course this ignores the fact that the a is not symmetrical which
> is why we use the o instead  but it looks impressive (as the T
> normally is symmetrical we don't really need the need the dir).

A variant that tries the implicite kernings in the order of
`aT', `oT', `To'. Also the code is compatible to plain-TeX:

\def\LuaTeX{%
  \begingroup
    Lua%
    \setbox0\hbox{aT}%
    \setbox2\hbox{a\kern0ptT}%
    \ifdim\wd0<\wd2 %
    \else
      \setbox0\hbox{oT}%
      \setbox2\hbox{o\kern0ptT}%
      \ifdim\wd0<\wd2 %   
      \else
        \setbox0\hbox{To}%
        \setbox2\hbox{T\kern0pto}%
      \fi
      \ifdim\wd0<\wd2 %  
        \dimen0=\wd0 %  
        \advance\dimen0-\wd2 %  
        \kern\dimen0 %  
      \fi  
    \fi    
    \TeX   
  \endgroup
}

Test file:

\documentclass[12pt,a4paper]{article}
\usepackage[
  vmargin=15mm
]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tgheros}
\let\rmdefault\sfdefault
\parindent=0pt
\providecommand*{\LuaTeX}{%
  \begingroup
    Lua%
    \setbox0\hbox{aT}%
    \setbox2\hbox{a\kern0ptT}%
\typeout{\ifdim\wd0=\wd2=\else*\fi aT: \the\wd0, \the\wd2}%
    \ifdim\wd0<\wd2 %
    \else
      \setbox0\hbox{oT}%
      \setbox2\hbox{o\kern0ptT}%
\typeout{\ifdim\wd0=\wd2=\else*\fi oT: \the\wd0, \the\wd2}%
      \ifdim\wd0<\wd2 %
      \else
        \setbox0\hbox{To}%
        \setbox2\hbox{T\kern0pto}%
\typeout{\ifdim\wd0=\wd2=\else*\fi To: \the\wd0, \the\wd2}%
      \fi
      \ifdim\wd0<\wd2 %
        \dimen0=\wd0 %
        \advance\dimen0-\wd2 %
        \kern\dimen0 %
      \fi
    \fi
    \TeX
  \endgroup
}
\begin{document}
\Huge
\def\test#1\\{%
  \fontfamily{#1}\selectfont Lua\TeX\newline \LuaTeX &
  \texttt{#1}\tabularnewline
  \hline
}
\def\Test#1{%
  \begingroup
    #1%
    \begin{tabular}{p{40mm}l}
    \hline
    \multicolumn{2}{c}{\texttt{\detokenize{#1}}}\tabularnewline
    \hline
    \test cmr\\
    \test cmss\\
    \test cmtt\\
    \test lmr\\
    \test lmss\\
    \test lmtt\\
    \test lmvtt\\
    \test qtm\\
    \test qhv\\
    \test qcr\\
    \end{tabular}%
  \endgroup
  \newpage
}
\Test{\normalfont}
\Test{\itshape}
\Test{\scshape} 
\end{document}

Best regards
  Heiko <oberdiek at uni-freiburg.de>


More information about the luatex mailing list