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">
      <test name="lang" compare="contains">
      <test name="family">
      <edit name="family" mode="prepend">

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?