HMF is Hydroxy-methyl-furfural aka Hydroxy-methyl-furfuraldehyde
It is a breakdown product of fructose in the presence of acid and heat. It's routinely tested for in honey by trading standards because it's an indicator of heat and storage problems in the honey. Not sure of the methods used, but likely to be a quick chemical reagent to indicate a problem followed up by something more quantitative like HPLC. In the UK (the EU and many other countries) the legal maximum level in sold honey is 40 mg/kg.
There is a table that David Cramp quotes in his book from a paper by Kushnir and Subers (1964). The heat that produces a level of 30mg/kg in honey:
Temp(C) Time
30 100-300 days
40 20-50 days
50 4-10 days
60 1-2.5 days
70 3-5 hours
80 <2 hours
If you boil sucrose (the normal crystallised cane or beet sugar) it will break down into glucose and fructose. Add acid, it breaks down faster and more of the fructose becomes HMF.
I don't have any data for how much HMF home made fondant will have (anybody?), but the basics must be avoid acid and keep the heat to the minimum needed (heat evenly and quickly, cool rapidly) which is what you have to bear in mind heating to reduce granulation or easing filtering. HMF is toxic to bees, there is a cited paper, Jachimowrtz et al 1975 which may have more details why and levels but I don't have access to.