Place coriander seeds, cumin seeds, fennel seeds, mustard seeds, fenugreek seeds, black peppercorns, cloves, cardamom, dried red chilies and cinnamon in a frying pan over low heat.
Fry, stirring, for about 3-4 minutes or until the seeds start to change color.
Add curry leaves and pandan leaf (if using).
Fry, stirring, for another 2 minutes or until the leaves are crisp.
Transfer spices to a plate.
Add rice to the same pan. Fry, stirring, for about 2-3 minutes or until toasted.
Transfer to the plate.
Allow to cool completely.
Transfer to a food processor, and grind to a fine powder.
Store in an airtight container.