You might want to use the fc_list command to list available fonts, in the format you want them to be entered.
This is how that fits into your sample code:
_completeWithFontName() { < <(fc-list -f "%{family}\n" | grep "^$2" | sort -u) mapfile -t COMPREPLY; } complete -F _completeWithFontName doSomethingWithFont
Note that you should not pipe into the mapfile command: piping puts the destination command into a subshell, and you would loose the new contents of the COMPREPLY array immediately, on exit of that subshell. Redirecting < from a process substitution <(...) works better.
The -f parameter to fc-list sets the format, the simple grep command selects those font names that match the first characters entered on the command line, and the sort is for convenience. I also add a -u (unique) parameter to the sort because in this example I list only the families; each variant would appear as a duplicate, so we should sort them out.