macro(adjust in_size in_xhot in_yhot)
   math(EXPR out_size "( ${in_size} * ${dpi} ) / 90")
   math(EXPR out_xhot "( ${in_xhot} * ${dpi} ) / 90")
   math(EXPR out_yhot "( ${in_yhot} * ${dpi} ) / 90")
   set(out_line "${out_size} ${out_xhot} ${out_yhot} ${ARGN}")
   string(REPLACE ";" " " out_line "${out_line}")
   list(APPEND out_contents "${out_line}")
endmacro(adjust)

file(READ "${config}" in_contents)
set(out_contents)
string(REPLACE "\n" ";" in_contents "${in_contents}")
foreach(in_line ${in_contents})
   string(REGEX REPLACE "[ \t]+" ";" in_line "${in_line}")
   adjust(${in_line})
endforeach(in_line)
string(REPLACE ";" "\n" out_contents "${out_contents}")
file(WRITE "${output}" "${out_contents}\n")
