LO HTML to PDF conversion, font config for lang fails

We are using LO 5.4 for converting HTML to PDF via UNO API. We have added some font configuration (fonts.conf) to select a particular Malayalam font when the language is Malayalam(ml-in)

<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    <match>
      <test name="lang" compare="contains">
        <string>ml</string>
      </test>
      <test name="family">
        <string>sans-serif</string>
      </test>
      <edit name="family" mode="prepend">
        <string>Meera</string>
      </edit>
    </match>
    </fontconfig>

But when we convert a HTML containing Malayalam (ml-in) language using LO then this matching always fails but when we use wkhmtltopdf then this match is successful, so after debugging (FC_DEBUG) we found that the language comparison fails for LO i.e. the language is printed as hi instead of ml, why is it so? are we missing any configuration?

@Hrbrgr may I know why this is closed? how both the questions are same?