\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#300: Examine Glyph Substitution in the 'font actual' Command}
\date{November 25, 2006}
\author{Kevin B. Kenny}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#300}&\textbf{Examine Glyph Substitution in the 'font actual' Command}\\\hline
Author&

Kevin B. Kenny \tipmail{kennykb}{acm.org}
\\
Created&Saturday, \(\text{25}^{\text{th}}\) November 2006\\
Type&Project\\
Tcl Version&\(8.5\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.4 $\\
Keywords&Tk\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes enhancing the \textbf{font actual} command to allow determining the actual font to be used when rendering a specific character.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Background}

Tk, when rendering strings in a widget, often needs to augment the characters in the requested font with characters borrowed from other fonts. As of the date of this TIP, there is no way for a program to introspect this mechanism. This ability has been requested by several user interface designers, because the interfaces are often more attractive if the substitute fonts are used directly, or simply to determine what font was chosen.

\section{Proposed Change}

This TIP proposes modifying the \textbf{font actual} command to have the syntax:

\begin{quote}
\textbf{font actual} \textit{font} ?\textbf{-displayof} \textit{window}? ?\textit{option}? ?\textbf{-{}-}? ?\textit{char}?
\end{quote}

The \textit{font}, \textbf{-displayof} and \textit{option} arguments are unchanged from the current [font actual] command.

The \textbf{-{}-} option marks the end of options. It is needed if \textit{option} is not supplied and \textit{char} may be a hyphen, to distinguish \(''\)char' from a misspelt option.

The \textit{char} option must be a single character.

The result of the command, if the \textit{char} option is supplied, is the actual font used to render the given character, rather than the base font.

\section{Reference Implementation}

A reference implementation for the proposed feature, including documentation and test suite updates, is at SourceForge as Tk Patch \#1602955.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
