set fontx to null instead of 0 if the encoding is switched to non-utf8

Should fix a segfault reported by consolers.