I'm trying to use diacritical marks for Sanskrit with a font that does not natively support all the marks (Minion Pro). So they are compounded somehow by XeTeX. This works almost fine in using:
\documentclass{scrartcl}
\usepackage{xunicode,xltxtra}
\usepackage{fontspec,newunicodechar}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Minion Pro}
\newunicodechar{Ṛ}{\d{R}}
\newunicodechar{ṛ}{\d{r}}
\newunicodechar{Ṝ}{\={\d{R}}}
\newunicodechar{ṝ}{\={\d{r}}}
\newunicodechar{Ḷ}{\d{L}}
\newunicodechar{ḷ}{\d{l}}
\newunicodechar{Ḹ}{\={\d{L}}}
\newunicodechar{ḹ}{\={\d{l}}}
\newunicodechar{ṃ}{\d{m}}
\newunicodechar{ḥ}{\d{h}}
\newunicodechar{Ṭ}{\d{T}}
\newunicodechar{ṭ}{\d{t}}
\newunicodechar{Ḍ}{\d{D}}
\newunicodechar{ḍ}{\d{d}}
\newunicodechar{Ṅ}{\.{N}}
\newunicodechar{ṅ}{\.{n}}
\newunicodechar{Ṇ}{\d{N}}
\newunicodechar{ṇ}{\d{n}}
\newunicodechar{Ṣ}{\d{S}}
\newunicodechar{ṣ}{\d{s}}
\begin{document}
a A
ā Ā
i I
ī Ī
u U
ū Ū
ṛ Ṛ
ṝ Ṝ
ḷ Ḷ
ḹ Ḹ
e E
ai Ai
o O
au Au
ṃ ḥ
k K
c C
ṭ Ṭ
t T
p P
kh Kh
ch Ch
ṭh Ṭh
th Th
ph Ph
g G
j J
ḍ Ḍ
d D
b B
gh Gh
jh Jh
ḍh Ḍh
dh Dh
bh Bh
ṅ Ṅ
ñ Ñ
ṇ Ṇ
n N
m M
y Y
r R
l L
v V
ś Ś
ṣ Ṣ
s S
h H
\end{document}
But the macrons above Ḹ, ḹ, Ṝ, and ṝ are misplaced and thiner than the ones above ā, ī and so on. What can I do about that?
Second problem: This fails completely in LuaTeX. xltxtra seems to be essential for this to work. But this is not supported in LuaTeX. I tried this using this code: http://tex.stackexchange.com/a/20791/19458
But the dots below are bigger than the i-dot. This is not the case with the solution above using XeTeX. Any idea how to do this in a better way in LuaTeX? Is it possible at all?

\UndeclareUTFCompositedeclarations and the redefinition of\d. Probably also a redefinition of\.is necessary. – egreg Nov 27 '12 at 23:47\UndeclareUTFComposite. In LuaTeX even with\UndeclareUTFCompositethe dots are too big with the solution cited above. How am I supposed to redefine\dand\.? – Psychic Birdy Nov 29 '12 at 8:46