Hi Sebin,
It is relatively easy to detect whether there is a reasonable malayalam font in the system - a common technique is to compare the size of a conjunct with its components. For example, in a good Malayalam font, 'ട' and 'ട്ട' will have same length. If the font cannot form this common conjunct the length would vary quite a bit.
If there is no good malayalam font, automatically select a font.
Another smaller concern is that both the given fonts are of traditional script. Choices should include reformed script font as well. Since the current mainstream printing is defaulting to reformed script, wikipedia also should do the same.