I've been trying to typeset a document that has *a lot* of phonetic transcriptions, and I'm trying to do it using Tex Gyre Bonum for the body and Charis SIL for the phonetic transcriptions. I'm trying to load these with `fontspec`, but `tipa` is famous for not playing along when `fontspec` is involved.

My initial attempt (based on egreg's answer to [this](https://tex.stackexchange.com/questions/64830/) question) was to redefine the `textipa` command to use a custom font:

```
\newfontfamily{\ipafont}{Charis SIL}
\AtBeginDocument{
  \renewcommand\textipa[1]{{\ipafont\tipaencoding #1}}
}

```

but that didn't work (see image below to see *how* it didn't work). What is odd is that it did work if I used the same instructions in an entirely new command and using the default `textipa` command. But that, of course, meant that the source was no longer compilable using regular `tipa`...

So, **how can I redefine `textipa` to work with a font of my choosing without having to input some of the characters myself?**

Here's an MWE to show all the different types of fail:

```
\documentclass{article}
\usepackage{tipa}
% \expandafter\def\csname ver@xunicode.sty\endcsname{}
\usepackage{fontspec}

\setmainfont{TeX Gyre Bonum}
\newfontfamily{\ipafont}{Charis SIL}

\newcommand{\mytipa}[1]{{\ipafont \textipa{#1}}}

\begin{document}

\begin{itemize}

\item This works only without \texttt{fontspec}:
  \textipa{\t{\=*{t}S}}

\item With \texttt{fontspec} and custom \texttt{ipafont}
  this fails:
  {\ipafont \textipa{\t{\=*{t}S}}}
  ; but this works: 
  {\ipafont \textipa{\t{ṯS}}}

\item Likewise, with a custom command,
  this fails:
  \mytipa{\t{\=*{t}S}}
  ; but this works:
  \mytipa{\t{ṯS}}

\renewcommand\textipa[1]{{\ipafont \tipaencoding #1}}

\item But with a redefined \texttt{textipa} command
  this fails:
  \textipa{\t{\=*{t}S}}
  ; and this \textit{also} fails:
  \textipa{\t{ṯS}}

\end{itemize}

\end{document}

```

And the output:

![enter image description here](https://i.stack.imgur.com/a6cJm.png)

ALSO: In [a follow-up question](https://tex.stackexchange.com/questions/100059) Joseph Wright recently provided a solution to similar issues to those raised when compiling the MWE (and that's the commented line at the beginning). However, as you can see by uncommenting it, even though it makes all the lines work (except those with `ṯ` in the source), it makes them work using the default `tipa` font, which is not what I want.