TA的每日心情 | 开心 2020-9-18 14:51 |
---|
签到天数: 47 天 [LV.5]常住居民I
|

楼主 |
发表于 2013-12-28 23:39:43
|
显示全部楼层
本帖最后由 lhxzui 于 2013-12-28 23:51 编辑
关于这个问题,Martin_fr给出的新的回复,说实话,我看着真是费劲,因为刚接触Lazarus不久,再加上英语不给力。想深究的大神可以通过下面的连接,到该页最下部看原文。
而我这里自从用了Deja Vu Sans Mono,A-OK.
http://forum.lazarus.freepascal.org/index.php/topic,22558.60.html
这里引用一份过来:
[quote author=Martin_fr link=topic=22558.msg137146#msg137146 date=1388236890]
@lhxzui
There is indeed an issue with this (and a few other) char(s).
Background: The editor does only deal with monospaced fonts. In a monospaced font there are chars of only 2 widths (full (some east Asian and others) and half (Latin)).
http://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms
http://www.unicode.org/reports/tr11/
The width of each char can (or should) be predicted from a table http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
(actually a few a ambiguous)
Your comma is utf8 e3 80 81 or in the table 3001 (marked "W")
It appears that this table is currently not fully implemented.
If the char width that the editor believes, differs from he actual font, then you get missing chars, and chars that jump, when the caret moves.
But it is not that simple to fix. The error does not happen on my PC. It appears that European versions of windows treat those chars as half width.
This means adding the missing entries will only shift the problem: It will (probably) work for you, but then fail for others, that get correct results now.
------------------------------
This will not be possible to fix for 1.2
And due to the above problem with different window versions, it is unclear how and when it will be fixed.
There are various ways you can try to workaround the problem.
You need only 1 of them. I expect 2 should be best.
1) In the options / Editor / Display: Change the "Extra char spacing" to 1 or -1
This does however look ugly
2) Compile (on windows only) your IDE with WithSynExperimentalCharWidth defined.
Add to defines in "Configure build lazarus" or add command line option -pWithSynExperimentalCharWidth
3) add e3 80 81 to the list in SynEditTextDoubleWidthChars
But there are more chars....
4) unit SynTextDrawer
line 673 in procedure CalcFontAdvance- // take several samples
- ETO := False;
复制代码 change the value to "True"
again this may not always look nice. (but better than (1))
-----------------------------
This should be reported on mantis
[/quote]
|
|