Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to use SimSun(宋体) font to display interpunct/middle dot ·, single quotes (curly) ‘’, double quotes (curly) “” characters in their full width forms, because it's easy to distinguish them from .(dot) '(single quote) "(double quote), and such distinguishable visibility is especially useful when typing code using input method, because input method can input ·‘’“” characters easily and made the code can't be compiled (char *str=“will not compile”;).

In gedit and geany and leafpad editor, set font to SimSun will make it work as expected.

Geany editor, SimSun font, full width forms

However in gnome-terminal, set font to SimSun does not get expected result. It seems gnome-terminal use another font to display their half width forms, or it seems they're just crowded together.

gnome-terminal, SimSun font, half width forms

I also tried lxterminal(LXDE) and Terminal(xfce) and ROXTerm, they displayed as the same as gnome-terminal did.

How to let these terminal emulators display punctuations in their full width forms like Geany does?

Sample text


Unicode code points (HEX)

   UTF16  UTF8
· 00B7   C2B7
‘ 2018   E28098
’ 2019   E28099
“ 201C   E2809C
” 201D   E2809D
share|improve this question

1 Answer 1

up vote 1 down vote accepted

For older versions of gnome-terminal, you should export a VTE_CJK_WIDTH=wide variable before starting the first gnome-terminal instance.

Newer versions of gnome-terminal (probably as of 3.12 or 3.14) moved this to a UI setting: Profile preferences -> Compatibility -> Ambiguous-width characters: Narrow (default) or Wide (what you're looking for).

Note that whatever complex application (e.g. text editor) you're running inside your terminal should also be notified about this change, otherwise it'll have false assuptions about the cursor's location and the display will likely fall apart. I'm not aware of a generic method for this (there could/should be a locale where wcwidth() returns 2 for these characters rather than 1, but I don't think there's any), so you'll have to configure each app separately (if they have such a config option at all). Simple utilities that don't care about the cursor, e.g. a cat command should work without modification.

share|improve this answer
And to clarify: in gnome-terminal the width of a character (whether it occupies one or two cells) is never derived from the font. – egmont Apr 23 at 12:23
Thanks a lot!!! The UI setting in newer version of gnome-terminal works well (although it requires opening a new instance). VTE_CJK_WIDTH=wide works for some other terminals, including lxterminal lilyterm, but not mate-terminal - the one from MATE Desktop (which is derived from GNOME2). – LiuYan 刘研 Apr 24 at 6:49
It looks there's a bug in bash, when VTE_CJK_WIDTH=wide: If I pasted ·“”‘’ in bash command line,I can't move the cursor back to home of command line input, I can only move the cursor back to the middle of of ·“”‘’ – LiuYan 刘研 Apr 24 at 6:56
This is not a bug in bash per se. Every application that does cursor positioning needs to know about the change. You might have missed this in my answer, or didn't think that bash also belons to this category. I don't think bash supports this, and I'm not sure if this feature should belong to bash or the locale system. Unfortunately, with this settings you're restricted to utilities that produce some continuous output flow without caring about the cursor position, and apps that do cursor movement but can handle the ambiguous-width characters being double-wide. – egmont Apr 24 at 9:14
If I run vim from bash command line, vim can handle the full width form correctly (both displaying and cursor moving), cat is acting like bash. – LiuYan 刘研 Apr 24 at 10:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.