John, Zdenek, thanks for your most helpful hints.

Below is what I came up with eventually, with MWE attached. The spacing adjustments are still subject to change. I have no idea why the spacing adjustments are required in roman! It turns out I need to fake bold as well, and I will probably need to redefine `\textbf` eventually, without breaking things I hope!

John, your version worked once I had removed most whitespace, which leaked through to the output, but I ended up using more LaTeXy language to help myself keep things straight in my head when I added the bold(italic) alternatives.

Ross, I believe I am subscribed with my b...@melroch.se address. If there is a problem with this mail too I'm probably not, otherwise there may have been a glitch with using an alternate From address on my phone. I have my email forwarded around a lot these days. Hard to disentagle!

/bpj

````
\usepackage{ifthen}
\usepackage{newunicodechar}
\newfontface\fakeslantfont{FreeSerif}[FakeSlant=0.3]
\newfontface\fakeboldfont{FreeSerif}[FakeBold=1.05]
\newfontface\fakeboldslantfont{FreeSerif}[FakeBold=1.1,FakeSlant=0.3]
\newcommand\objLang[1]{{\italictrue\textit{#1}}} % (double braces to keep things local).
\newcommand\myStrong[1]{{\boldtrue\textbf{#1}}}
\newif\ifitalic
\newif\ifbold
\newcommand\fakeBSChar[1]{% #1 = the char
  \newunicodechar{#1}{{%
    \ifthenelse{\boolean{italic}}{%
      \ifthenelse{\boolean{bold}}{%
        \fakeboldslantfont\hspace{-0.07em}#1\hspace{0.05em}}{%
          \fakeslantfont\hspace{-0.05em}#1\hspace{0.05em}}}{%
        \ifthenelse{\boolean{bold}}{%
          \fakeboldfont\hspace{-0.05em}#1\hspace{0.02em}}{%
            \hspace{-0.03em}#1}}}}
}
````


\documentclass[]{article}
\usepackage{fontspec}
\defaultfontfeatures{ Renderer=ICU, Scale=MatchLowercase, Ligatures=TeX, }
\setmainfont{FreeSerif}

\usepackage{ifthen}
\usepackage{newunicodechar}
\newfontface\fakeslantfont{FreeSerif}[FakeSlant=0.3]
\newfontface\fakeboldfont{FreeSerif}[FakeBold=1.05]
\newfontface\fakeboldslantfont{FreeSerif}[FakeBold=1.1,FakeSlant=0.3]
\newcommand\objLang[1]{{\italictrue\textit{#1}}} % (double braces to keep things local).
\newcommand\myStrong[1]{{\boldtrue\textbf{#1}}}
\newif\ifitalic
\newif\ifbold
\newcommand\fakeBSChar[1]{% #1 = the char
  \newunicodechar{#1}{{%
    \ifthenelse{\boolean{italic}}{%
      \ifthenelse{\boolean{bold}}{%
        \fakeboldslantfont\hspace{-0.07em}#1\hspace{0.05em}}{%
          \fakeslantfont\hspace{-0.05em}#1\hspace{0.05em}}}{%
        \ifthenelse{\boolean{bold}}{%
          \fakeboldfont\hspace{-0.05em}#1\hspace{0.02em}}{%
            \hspace{-0.03em}#1}}}}
}
\fakeBSChar{Ꞵ}
\fakeBSChar{ꞵ}

\begin{document}

\objLang{{ΘꞴĄM}}

\myStrong{{\objLang{{ΘꞴĄM}}}}

ΘꞴĄM

\myStrong{{ΘꞴĄM}}

\objLang{{θꞵąm}}

\myStrong{{\objLang{{θꞵąm}}}}

θꞵąm

\myStrong{{θꞵąm}}

\end{document}

--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to