\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#205: Use pkgconfig Database to Register Xft Support}
\date{June 23, 2004}
\author{Joe English}
\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 \#205}&\textbf{Use pkgconfig Database to Register Xft Support}\\\hline
Author&

Joe English \tipmail{jenglish}{users.sourceforge.net}
\\
Created&Wednesday, \(\text{23}^{\text{rd}}\) June 2004\\
Type&Project\\
Tcl Version&\(8.5\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.5 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes to use Tcl's package configuration database (see \cite{tip59}) to register whether Tk was compiled with support for Xft.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

As of version 8.5, Tk has optional support for Xft (the modern replacement for server-side fonts in X11). However, at present application code has no way to determine whether or not Xft support was enabled when Tk was built. The package configuration database facility introduced in \cite{tip59} seems like an ideal place to record this information.

\section{Proposal}

If Tk was configured with \textit{-{}-enable-xft}, the command
\begingroup\small\begin{verbatim}
 tk::pkgconfig get fontsystem
\end{verbatim}
\endgroup

shall return the value \textbf{xft}.

\section{Notes}

The change as currently proposed is the minimum necessary to satisfy the requirement listed in the Rationale. In particular: nothing else in Tk currently calls \textit{Tcl\_RegisterConfig()}, so if Xft support is not enabled the \textbf{tk::pkgconfig} command will remain undefined.

This TIP (or something like it) is a prerequisite for a script-level implementation of \cite{tip145}, which will need to distinguish whether or not Xft is in use.

\section{Implementation}

See Tk Patch \#976520[\url{http://sourceforge.net/support/tracker.php?aid=976520}]

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\begin{thebibliography}{TIP \#2}
\addcontentsline{toc}{section}{References}
\bibitem[TIP \#59]{tip59}
Andreas Kupries,
\emph{Embed Build Information in Tcl Binary Library},
on-line at \url{http://purl.org/tcl/tip/59.html}
\bibitem[TIP \#145]{tip145}
Pat Thoyts,
\emph{Enhanced Tk Font Handling},
on-line at \url{http://purl.org/tcl/tip/145.html}
\end{thebibliography}
\end{document}
