Tab inconsistency when using double-byte chars. |
|
This is the problem:
http://tinypic.com/view.php?pic=1pil5d&s=7 I don't have this problem in other -non-Japanese- text/code editors. Tabs are aligned fine even if I mix double and single byte characters. PhpED is far superior to those editors, so can I expect a fix in *near* future versions? |
||||||||||||
|
Site Admin
|
btw it's a question explained in the FAQ
http://www.nusphere.com/kb/technicalfaq/tip_chinese_characters.htm 1) uncheck Monospaced fonts checkbox 2) select appropriate Character set for the font 3) select font that contains double-width characters results depends on the font you selected. If the characters are represented with exactly the same width, the tabs will be aligned at the same width. |
||||||||||||
_________________ The PHP IDE team |
|
In Windows, Monospace, Courier New, Droid Sans Mono, Bitstream Vera Sans Mono all of them are mono spaced fonts and all of them support double-width Japanese characters.
But when I select both SHIFTJIS and monospace I cannot see anything in the font list. But that is not the point. Why do you need to check my coding font for tabs anyway? There is no English tab, Chinese tab or Russian tab. Tab is a tab everywhere. Why don't you use default system mono-spaced font for the tab character, regardless what I choose for coding? Edit: Re-read you post. You said "un-check", sorry. I unchecked the monospaced and I had the font list. But the result are the same. Typically, all full-width Japanese characters has same width, as well as all the ASCII characters (Droid Sans Mono). However, Japanese characters and ASCII characters are not same width, obviously. |
||||||||||||
|
Site Admin
|
Typically or not, they more than often are not monospaced. Anyway, with that option checked, you get some (little) performance improvement but if the font is not truly monospaced, the characters will overlap and cause some other inaccurate effects. With dbl-width fonts it's always safer to turn the option off.
Regarding "tab" characters -- it depends. Some document processors like MS Word allow you to specify visual positions the tabs will align to. In other editors like PhpED it works differently. TAB just moves caret using some fixed alignment. For the sake of simplicity assume you specified in the settings that TAB should be aligned to 4 spaces. In this case entering tab at 1st postion will move caret to the right by 4 spaces (effectively). If the caret was at say 3rd position, caret will move by only two spaces, and so forth -- the target position will be the same until you move caret to the 5th position. In this case caret will move by four spaces again introducing next alignment position. It works fine if the font is not monospaced. But it won't align to fixed visual position if it's not. It works this way for the performance reasons and this is a common practice in all code editors I know. |
||||||||||||
_________________ The PHP IDE team |
Tab inconsistency when using double-byte chars. |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by