Fix a font bug for terminal emacs

When started from term, emacs is not able to load the font installed by user, so I set the font only when we start from X.