Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using a typeface that has limited support for letters with diacritics. I am looking to use the features in latex (I'm using xetex on ubuntu) for providing the glyphs I am missing.

My font has precomposed glyphs for dot-over-letters (like ȯ) but not for dot-under-letters (like ). I know I can produce a dot under a d using \d{d} However the size of the dot in the precomposed glyph is much bigger than the size of the dot manually placed under by latex. This creates a bad look in cases where both diacritics occur in the same word.

Is is possible that I can tell latex to increase the size of the dot by some metric without affecting the size of the alphabet? Ideally I want to be able to do something like \bigger_dot_under{d} instead of \d{d}

where \bigger_dot_under{} is somehow defined to be 2x or 3x of \d{}, or in absolute mm/em metrics, point sizes or HUGE/Large terminology

share|improve this question
    
Can you look at this answer? It gives a way for redefining the under dot; where the period is produced, you can choose a different font where the period is bigger. –  egreg Jun 6 '13 at 8:46

1 Answer 1

up vote 1 down vote accepted

I've reworked the solution to make it clean. In the process, I've reduced it to a single routine called \underdot. There are two parameters to adjust: \dotscale which is the size of the underdot and \offset which is the distance below the bottom of the letter at which the top of the dot begins. The routine accounts for descended letters.

\documentclass{article}
\usepackage{scalerel}
\usepackage{lipsum}

\newlength\dotscale
\newlength\offset
\newsavebox\newdotbox
\newsavebox\letterbox

\dotscale=.3ex         % DOTSIZE<---CAN CHANGE THESE
\offset=.25ex          % BELOW-BASELINE GAP ABOVE DOT

\def\newdot{\scalerel*{.}{\rule[-\dotscale]{1ex}{\dotscale}}}

\newcommand*\underdot[1]{%
  \sbox{\letterbox}{#1}%
  \sbox{\newdotbox}{\raisebox{-\dp\letterbox}{\raisebox{-\offset}{\newdot}}}%
  \usebox{\letterbox}%
  \hspace{-.5\wd\letterbox}%
  \hspace{-.5\wd\newdotbox}%
  \usebox{\newdotbox}%
  \hspace{-.5\wd\newdotbox}%
  \hspace{.5\wd\letterbox}%
}

\begin{document}

d\d{d}
\dotscale=.15ex\underdot{d}%
\dotscale=.4ex\underdot{t}%
\dotscale=.5ex\underdot{a}
p\d{p}
\dotscale=.4ex\underdot{p}%
\dotscale=.5ex\underdot{q}%
\dotscale=.15ex\underdot{g}
\lipsum[4]

\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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